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

Issue 5693109165883392: Issue 2040 - Replaced localStorage with chrome.storage.local (Closed)

Created:
Feb. 26, 2015, 12:10 p.m. by Sebastian Noack
Modified:
April 20, 2015, 3:22 p.m.
Reviewers:
kzar, Wladimir Palant
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue 2040 - Replaced localStorage with chrome.storage.local

Patch Set 1 : #

Total comments: 15

Patch Set 2 : Rebased #

Total comments: 5

Patch Set 3 : Rebased and used map func for migration code #

Total comments: 2

Patch Set 4 : Addressed comment #

Patch Set 5 : Re-introduces defaults mapping, added Prefs.onLoading event, made currentVersion a pref #

Patch Set 6 : Fixed typo in variable name #

Patch Set 7 : Rebased and renamed onProgress() to checkLoaded() #

Total comments: 2

Patch Set 8 : Moved canUseChromeNotifications back #

Total comments: 2

Patch Set 9 : Fixed typo in comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -106 lines) Patch
M background.js View 1 2 3 4 5 6 7 3 chunks +66 lines, -37 lines 0 comments Download
M chrome/ext/background.js View 1 2 3 4 5 6 7 8 1 chunk +35 lines, -1 line 0 comments Download
M lib/prefs.js View 1 2 3 4 2 chunks +97 lines, -54 lines 0 comments Download
M lib/stats.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M lib/storage/io.js View 4 chunks +10 lines, -10 lines 0 comments Download
M metadata.chrome View 1 chunk +1 line, -0 lines 0 comments Download
M qunit/common.js View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M safari/ext/background.js View 1 2 3 4 5 6 1 chunk +64 lines, -1 line 0 comments Download

Messages

Total messages: 22
Sebastian Noack
Feb. 26, 2015, 12:53 p.m. (2015-02-26 12:53:01 UTC) #1
kzar
http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/chrome/ext/background.js#newcode511 chrome/ext/background.js:511: items["pref:" + key] = JSON.parse(value); Nit: Shouldn't this make ...
March 9, 2015, 3:10 p.m. (2015-03-09 15:10:29 UTC) #2
Sebastian Noack
http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/chrome/ext/background.js#newcode511 chrome/ext/background.js:511: items["pref:" + key] = JSON.parse(value); On 2015/03/09 15:10:29, kzar ...
March 9, 2015, 3:21 p.m. (2015-03-09 15:21:36 UTC) #3
kzar
http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/chrome/ext/background.js#newcode511 chrome/ext/background.js:511: items["pref:" + key] = JSON.parse(value); On 2015/03/09 15:21:37, Sebastian ...
March 9, 2015, 3:24 p.m. (2015-03-09 15:24:28 UTC) #4
Sebastian Noack
http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/storage/io.js File lib/storage/io.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/storage/io.js#newcode36 lib/storage/io.js:36: safari.extension.settings[path] = contents; On 2015/03/09 15:24:28, kzar wrote: > ...
March 9, 2015, 3:27 p.m. (2015-03-09 15:27:49 UTC) #5
kzar
http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/storage/io.js File lib/storage/io.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/storage/io.js#newcode36 lib/storage/io.js:36: safari.extension.settings[path] = contents; On 2015/03/09 15:27:49, Sebastian Noack wrote: ...
March 9, 2015, 3:32 p.m. (2015-03-09 15:32:54 UTC) #6
kzar
Same as review for 2021, pretty much LGTM but I really think Wladimir should check ...
March 9, 2015, 4:55 p.m. (2015-03-09 16:55:19 UTC) #7
Wladimir Palant
http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/prefs.js File lib/prefs.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/prefs.js#newcode91 lib/prefs.js:91: } The flow here is rather convoluted, a change ...
March 12, 2015, 11:05 p.m. (2015-03-12 23:05:37 UTC) #8
Sebastian Noack
Looking into the other comments tomorrow. http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/prefs.js File lib/prefs.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5741031244955648/lib/prefs.js#newcode91 lib/prefs.js:91: } On 2015/03/12 ...
March 12, 2015, 11:35 p.m. (2015-03-12 23:35:29 UTC) #9
Sebastian Noack
http://codereview.adblockplus.org/5693109165883392/diff/5639274879778816/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5639274879778816/chrome/ext/background.js#newcode543 chrome/ext/background.js:543: } On 2015/03/12 23:35:29, Sebastian Noack wrote: > On ...
March 13, 2015, 10:30 a.m. (2015-03-13 10:30:39 UTC) #10
Wladimir Palant
http://codereview.adblockplus.org/5693109165883392/diff/5681717746597888/safari/ext/background.js File safari/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5681717746597888/safari/ext/background.js#newcode713 safari/ext/background.js:713: if (item) Add |&& item.key != key| here? I ...
March 16, 2015, 12:20 p.m. (2015-03-16 12:20:26 UTC) #11
Sebastian Noack
http://codereview.adblockplus.org/5693109165883392/diff/5681717746597888/safari/ext/background.js File safari/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5681717746597888/safari/ext/background.js#newcode713 safari/ext/background.js:713: if (item) On 2015/03/16 12:20:26, Wladimir Palant wrote: > ...
March 16, 2015, 12:54 p.m. (2015-03-16 12:54:34 UTC) #12
Wladimir Palant
LGTM
March 16, 2015, 1:27 p.m. (2015-03-16 13:27:36 UTC) #13
Sebastian Noack
I have merged some changes from http://codereview.adblockplus.org/5251132066627584 into this patch, since they make sense for ...
March 20, 2015, 1:22 p.m. (2015-03-20 13:22:26 UTC) #14
Sebastian Noack
April 8, 2015, 3:06 p.m. (2015-04-08 15:06:53 UTC) #15
Wladimir Palant
http://codereview.adblockplus.org/5693109165883392/diff/5740423507083264/background.js File background.js (left): http://codereview.adblockplus.org/5693109165883392/diff/5740423507083264/background.js#oldcode62 background.js:62: var canUseChromeNotifications = require("info").platform == "chromium" This variable is ...
April 9, 2015, 7:20 p.m. (2015-04-09 19:20:15 UTC) #16
Sebastian Noack
http://codereview.adblockplus.org/5693109165883392/diff/5740423507083264/background.js File background.js (left): http://codereview.adblockplus.org/5693109165883392/diff/5740423507083264/background.js#oldcode62 background.js:62: var canUseChromeNotifications = require("info").platform == "chromium" On 2015/04/09 19:20:15, ...
April 9, 2015, 9:35 p.m. (2015-04-09 21:35:54 UTC) #17
Wladimir Palant
LGTM
April 9, 2015, 9:57 p.m. (2015-04-09 21:57:18 UTC) #18
kzar
Otherwise LGTM http://codereview.adblockplus.org/5693109165883392/diff/5635415851663360/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5635415851663360/chrome/ext/background.js#newcode520 chrome/ext/background.js:520: // ignoring unkown and inavlid preferences. Nit: ...
April 13, 2015, 10:26 a.m. (2015-04-13 10:26:39 UTC) #19
Sebastian Noack
http://codereview.adblockplus.org/5693109165883392/diff/5635415851663360/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5693109165883392/diff/5635415851663360/chrome/ext/background.js#newcode520 chrome/ext/background.js:520: // ignoring unkown and inavlid preferences. On 2015/04/13 10:26:39, ...
April 13, 2015, 10:30 a.m. (2015-04-13 10:30:24 UTC) #20
kzar
LGTM
April 13, 2015, 10:31 a.m. (2015-04-13 10:31:10 UTC) #21
Wladimir Palant
April 13, 2015, 10:53 a.m. (2015-04-13 10:53:03 UTC) #22
Still LGTM

Powered by Google App Engine
This is Rietveld