Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Issue 217273003: Add whitelist support to repack. (Closed)

Created:
6 years, 8 months ago by aurimas (slooooooooow)
Modified:
6 years, 8 months ago
Reviewers:
Nico, newt (away)
CC:
grit-developer_googlegroups.com
Base URL:
https://chromium.googlesource.com/external/grit-i18n.git@master
Visibility:
Public.

Description

Add whitelist support to repack. - Added ability to filter out resources by specifying a file that contains a list of resource id whitelist. - Fixed lint errors in data_pack.py, data_pack_unittest.py and repack.py - Added tests for RePack() BUG=338759 R=newt@chromium.org, thakis@chromium.org Committed: https://code.google.com/p/grit-i18n/source/detail?r=158

Patch Set 1 #

Total comments: 6

Patch Set 2 : newt's nits #

Patch Set 3 : Added tests #

Patch Set 4 : Update expected variable names in tests #

Total comments: 6

Patch Set 5 : Nico's nit #

Patch Set 6 : Whitespace fix #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -45 lines) Patch
M grit/format/data_pack.py View 1 2 3 4 8 chunks +75 lines, -38 lines 1 comment Download
M grit/format/data_pack_unittest.py View 1 2 3 4 5 1 chunk +28 lines, -1 line 0 comments Download
M grit/format/repack.py View 1 chunk +16 lines, -6 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
aurimas (slooooooooow)
Hey Newton, PTAL. Aurimas
6 years, 8 months ago (2014-03-28 19:15:19 UTC) #1
newt (away)
lgtm after dict comprehension and other nits https://codereview.chromium.org/217273003/diff/1/grit/format/data_pack.py File grit/format/data_pack.py (right): https://codereview.chromium.org/217273003/diff/1/grit/format/data_pack.py#newcode79 grit/format/data_pack.py:79: """Return a ...
6 years, 8 months ago (2014-03-28 19:25:33 UTC) #2
aurimas (slooooooooow)
https://codereview.chromium.org/217273003/diff/1/grit/format/data_pack.py File grit/format/data_pack.py (right): https://codereview.chromium.org/217273003/diff/1/grit/format/data_pack.py#newcode79 grit/format/data_pack.py:79: """Return a string with a map of id=>data in ...
6 years, 8 months ago (2014-03-28 20:45:40 UTC) #3
aurimas (slooooooooow)
+thakis for another set of eyes. WDYT? These files were owned by joi@ and benrg@ ...
6 years, 8 months ago (2014-03-28 20:48:03 UTC) #4
aurimas (slooooooooow)
On 2014/03/28 20:48:03, aurimas wrote: > +thakis for another set of eyes. WDYT? > > ...
6 years, 8 months ago (2014-03-31 22:42:42 UTC) #5
Nico
I'm not super familiar with grit, but I think it has tests for most things, ...
6 years, 8 months ago (2014-04-01 18:25:53 UTC) #6
aurimas (slooooooooow)
On 2014/04/01 18:25:53, Nico wrote: > I'm not super familiar with grit, but I think ...
6 years, 8 months ago (2014-04-01 21:36:43 UTC) #7
newt (away)
lgtm
6 years, 8 months ago (2014-04-02 00:19:53 UTC) #8
Nico
lgtm, thanks! https://codereview.chromium.org/217273003/diff/60001/grit/format/data_pack.py File grit/format/data_pack.py (right): https://codereview.chromium.org/217273003/diff/60001/grit/format/data_pack.py#newcode135 grit/format/data_pack.py:135: def RePackFromDataPackStrings(inputs, whitelist): Thanks for splitting this ...
6 years, 8 months ago (2014-04-02 00:24:46 UTC) #9
aurimas (slooooooooow)
https://codereview.chromium.org/217273003/diff/60001/grit/format/data_pack.py File grit/format/data_pack.py (right): https://codereview.chromium.org/217273003/diff/60001/grit/format/data_pack.py#newcode167 grit/format/data_pack.py:167: whitelisted_resources = dict([(key, content.resources[key]) for key On 2014/04/02 00:24:46, ...
6 years, 8 months ago (2014-04-02 00:55:54 UTC) #10
Nico
https://codereview.chromium.org/217273003/diff/60001/grit/format/repack.py File grit/format/repack.py (right): https://codereview.chromium.org/217273003/diff/60001/grit/format/repack.py#newcode12 grit/format/repack.py:12: import optparse On 2014/04/02 00:55:55, aurimas wrote: > On ...
6 years, 8 months ago (2014-04-02 00:57:08 UTC) #11
aurimas (slooooooooow)
On 2014/04/02 00:57:08, Nico wrote: > https://codereview.chromium.org/217273003/diff/60001/grit/format/repack.py > File grit/format/repack.py (right): > > https://codereview.chromium.org/217273003/diff/60001/grit/format/repack.py#newcode12 > ...
6 years, 8 months ago (2014-04-02 01:01:30 UTC) #12
Nico
ship it!
6 years, 8 months ago (2014-04-02 01:04:44 UTC) #13
newt (away)
Committed patchset #6 manually as r158 (presubmit successful).
6 years, 8 months ago (2014-04-02 23:05:09 UTC) #14
Nico
6 years, 8 months ago (2014-04-21 18:21:03 UTC) #15
Message was sent while issue was closed.
(zombie review nit)

https://codereview.chromium.org/217273003/diff/100001/grit/format/data_pack.py
File grit/format/data_pack.py (right):

https://codereview.chromium.org/217273003/diff/100001/grit/format/data_pack.p...
grit/format/data_pack.py:130: whitelist = map(int, whitelist)
Should this be

  whitelist = set(map(int, whitelist))

? As is, the "if key in whitelist" below is a linear list scan I think, and
there are ~5k elements in the list. A set might be faster.

Powered by Google App Engine
This is Rietveld 408576698