Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 5732725684174848: Use safari.extension.settings instead of localStorage and WebSQL (Closed)

Created:
March 12, 2014, 2:11 p.m. by Sebastian Noack
Modified:
March 17, 2014, 10:18 a.m.
Visibility:
Public.

Description

We currently use WebSQL to store patterns.ini and localStorage for other settings on Safari. But Safari deals with extension data in localStorage and WebSQL databases, the same way as with website data. So when you clear your browsing data in the preferences or when Safari automatically cleans up old browsing data, it corrupts the Adblock Plus settings. According to some beta users this seems to happen quite often. However we can just use safari.extension.settings instead. The API is identical to localStorage, but it isn't limited to ~1 MB and persist when clearing browsing data. Just in case you wonder, those settings won't be shown to the user, since we don't specify them in Info.plist.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -210 lines) Patch
M background.js View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/ext/background.js View 1 chunk +5 lines, -0 lines 0 comments Download
M lib/filesystem/io.js View 1 chunk +2 lines, -2 lines 0 comments Download
M lib/prefs.js View 2 chunks +4 lines, -4 lines 0 comments Download
A lib/storage/io.js View 1 chunk +137 lines, -0 lines 0 comments Download
R lib/websql/io.js View 1 chunk +0 lines, -199 lines 0 comments Download
M metadata.safari View 1 chunk +1 line, -1 line 0 comments Download
M safari/ext/background.js View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2
Sebastian Noack
March 12, 2014, 2:20 p.m. (2014-03-12 14:20:12 UTC) #1
Wladimir Palant
March 12, 2014, 4:19 p.m. (2014-03-12 16:19:06 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld