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

Issue 29339112: Issue 3716 - Split up files stored in storage.local (Closed)

Created:
March 30, 2016, 4:50 a.m. by Oleksandr
Modified:
Sept. 2, 2016, 3:46 a.m.
Reviewers:
Sebastian Noack
CC:
kzar
Visibility:
Public.

Description

Issue 3716 - Split up files stored in storage.local

Patch Set 1 #

Total comments: 7

Patch Set 2 : Remove setMultiple. Use suggested code. #

Total comments: 7

Patch Set 3 : Modify Safari storage. Refactor chunk name creation. Add comments. #

Total comments: 3

Patch Set 4 : Make sure we don't leak chunks. Edit comments. Simplify safari storage. #

Total comments: 2

Patch Set 5 : Use Promise instead of onChanged listener #

Total comments: 3

Patch Set 6 : Fix the promise logic. Remove whitespace changes. #

Total comments: 2

Patch Set 7 : Remove the trailing comma. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -61 lines) Patch
M chrome/ext/background.js View 1 1 chunk +1 line, -3 lines 0 comments Download
M lib/io.js View 1 2 3 4 5 6 3 chunks +86 lines, -53 lines 0 comments Download
M lib/prefs.js View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M safari/ext/background.js View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 15
Oleksandr
March 30, 2016, 5:44 a.m. (2016-03-30 05:44:41 UTC) #1
Sebastian Noack
https://codereview.adblockplus.org/29339112/diff/29339113/chrome/ext/background.js File chrome/ext/background.js (right): https://codereview.adblockplus.org/29339112/diff/29339113/chrome/ext/background.js#newcode551 chrome/ext/background.js:551: setMultiple: function(items, callback) Rather than adding yet another method ...
March 30, 2016, 12:06 p.m. (2016-03-30 12:06:38 UTC) #2
Oleksandr
https://codereview.adblockplus.org/29339112/diff/29339113/lib/io.js File lib/io.js (right): https://codereview.adblockplus.org/29339112/diff/29339113/lib/io.js#newcode65 lib/io.js:65: var chunkSize = 104856; On 2016/03/30 12:06:37, Sebastian Noack ...
March 31, 2016, 9:59 a.m. (2016-03-31 09:59:55 UTC) #3
Sebastian Noack
https://codereview.adblockplus.org/29339112/diff/29339188/chrome/ext/background.js File chrome/ext/background.js (right): https://codereview.adblockplus.org/29339112/diff/29339188/chrome/ext/background.js#newcode545 chrome/ext/background.js:545: set: function(items, callback) You have to adapt safari/ext/background.js as ...
March 31, 2016, 12:36 p.m. (2016-03-31 12:36:54 UTC) #4
Oleksandr
March 31, 2016, 2 p.m. (2016-03-31 14:00:09 UTC) #5
Sebastian Noack
https://codereview.adblockplus.org/29339112/diff/29339188/lib/io.js File lib/io.js (right): https://codereview.adblockplus.org/29339112/diff/29339188/lib/io.js#newcode47 lib/io.js:47: if (typeof browser == "object") I just noticed that ...
March 31, 2016, 2:08 p.m. (2016-03-31 14:08:54 UTC) #6
Oleksandr
I think maybe promises is over complicating things a little here. How about the approach ...
March 31, 2016, 6:32 p.m. (2016-03-31 18:32:55 UTC) #7
Sebastian Noack
On 2016/03/31 18:32:55, Oleksandr wrote: > I think maybe promises is over complicating things a ...
March 31, 2016, 7:29 p.m. (2016-03-31 19:29:55 UTC) #8
Sebastian Noack
https://codereview.adblockplus.org/29339112/diff/29339243/safari/ext/background.js File safari/ext/background.js (left): https://codereview.adblockplus.org/29339112/diff/29339243/safari/ext/background.js#oldcode713 safari/ext/background.js:713: setTimeout(callback, 0); Nit: While changing the code here anyway, ...
March 31, 2016, 7:30 p.m. (2016-03-31 19:30:25 UTC) #9
Oleksandr
Decoupling cleanup from the write logic is actually a good idea here, IMO. onChanged event ...
April 1, 2016, 10:10 a.m. (2016-04-01 10:10:24 UTC) #10
Sebastian Noack
https://codereview.adblockplus.org/29339112/diff/29339257/lib/io.js File lib/io.js (right): https://codereview.adblockplus.org/29339112/diff/29339257/lib/io.js#newcode62 lib/io.js:62: loadFile(file).catch(() => null) The logic here is wrong. In ...
April 1, 2016, 10:49 a.m. (2016-04-01 10:49:44 UTC) #11
Oleksandr
Fingers crossed now! https://codereview.adblockplus.org/29339112/diff/29339267/lib/io.js File lib/io.js (right): https://codereview.adblockplus.org/29339112/diff/29339267/lib/io.js#newcode98 lib/io.js:98: if (typeof browser == "object") I ...
April 1, 2016, 12:45 p.m. (2016-04-01 12:45:10 UTC) #12
Sebastian Noack
https://codereview.adblockplus.org/29339112/diff/29339267/lib/io.js File lib/io.js (right): https://codereview.adblockplus.org/29339112/diff/29339267/lib/io.js#newcode150 lib/io.js:150: }, Nit: You added a redundant comma here. There ...
April 1, 2016, 1:01 p.m. (2016-04-01 13:01:05 UTC) #13
Oleksandr
April 1, 2016, 1:36 p.m. (2016-04-01 13:36:40 UTC) #14
Sebastian Noack
April 1, 2016, 1:39 p.m. (2016-04-01 13:39:59 UTC) #15
LGTM

Powered by Google App Engine
This is Rietveld