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

Unified Diff: tools/resources/find_used_resources.py

Issue 216233012: Add whitelist support for grit repack steps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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/tools/build/repack_locales.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/resources/find_used_resources.py
diff --git a/tools/resources/find_used_resources.py b/tools/resources/find_used_resources.py
index 60af3e5197f1a10d3dfd1ff6d96c156876a18f35..3fc3bcef33920ab2188e2fa28e9702cc7a06be66 100755
--- a/tools/resources/find_used_resources.py
+++ b/tools/resources/find_used_resources.py
@@ -18,7 +18,8 @@ script parses out the list of used resource ids. These resource ids show up in
the build output after building Chrome with gyp variable
enable_resource_whitelist_generation set to 1. This gyp flag causes the compiler
to print out a UnknownPragma message every time a resource id is used. E.g.:
-foo.cc:22:0: warning: ignoring #pragma IDS_FOO_BAR [-Wunknown-pragmas]
+foo.cc:22:0: warning: ignoring #pragma whitelisted_resource_12345
+[-Wunknown-pragmas]
"""
@@ -29,7 +30,7 @@ def GetResourceIdsInPragmaWarnings(input):
"""
used_resources = set()
unknown_pragma_warning_pattern = re.compile('warning: ignoring #pragma '
- '(?P<resource_id>[A-Z0-9_]*) \[-Wunknown-pragmas\]')
+ 'whitelisted_resource_(?P<resource_id>[0-9]*) \[-Wunknown-pragmas\]')
for ln in input:
match = unknown_pragma_warning_pattern.search(ln)
if match:
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698