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

Unified Diff: tools/grit/grit/format/data_pack.py

Issue 2209763002: Revert of Enable whitelist generation for all builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_repack_locales.gni ('k') | tools/grit/grit/format/repack.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/format/data_pack.py
diff --git a/tools/grit/grit/format/data_pack.py b/tools/grit/grit/format/data_pack.py
index 9f92b7c608b79183f939475590292dcefe09175c..02616c39d40443d1c583f3acb351c7708f13ec54 100755
--- a/tools/grit/grit/format/data_pack.py
+++ b/tools/grit/grit/format/data_pack.py
@@ -109,8 +109,7 @@
file.write(content)
-def RePack(output_file, input_files, whitelist_file=None,
- suppress_removed_key_output=False):
+def RePack(output_file, input_files, whitelist_file=None):
"""Write a new data pack file by combining input pack files.
Args:
@@ -119,8 +118,6 @@
whitelist_file: path to the file that contains the list of resource IDs
that should be kept in the output file or None to include
all resources.
- suppress_removed_key_output: allows the caller to suppress the output from
- RePackFromDataPackStrings.
Raises:
KeyError: if there are duplicate keys or resource encoding is
@@ -131,20 +128,17 @@
if whitelist_file:
whitelist = util.ReadFile(whitelist_file, util.RAW_TEXT).strip().split('\n')
whitelist = set(map(int, whitelist))
- resources, encoding = RePackFromDataPackStrings(
- input_data_packs, whitelist, suppress_removed_key_output)
+ resources, encoding = RePackFromDataPackStrings(input_data_packs, whitelist)
WriteDataPack(resources, output_file, encoding)
-def RePackFromDataPackStrings(inputs, whitelist,
- suppress_removed_key_output=False):
+def RePackFromDataPackStrings(inputs, whitelist):
"""Returns a data pack string that combines the resources from inputs.
Args:
inputs: a list of data pack strings that need to be combined.
whitelist: a list of resource IDs that should be kept in the output string
or None to include all resources.
- suppress_removed_key_output: Do not print removed keys.
Returns:
DataPackContents: a tuple containing the new combined data pack and its
@@ -176,9 +170,8 @@
resources.update(whitelisted_resources)
removed_keys = [key for key in content.resources.keys()
if key not in whitelist]
- if not suppress_removed_key_output:
- for key in removed_keys:
- print 'RePackFromDataPackStrings Removed Key:', key
+ for key in removed_keys:
+ print 'RePackFromDataPackStrings Removed Key:', key
else:
resources.update(content.resources)
« no previous file with comments | « chrome/chrome_repack_locales.gni ('k') | tools/grit/grit/format/repack.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698