Chromium Code Reviews| Index: chrome/android/BUILD.gn |
| diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn |
| index 1bb7d1ce0800f6f9749b44c453c1024f15225f68..da73c0165630795180dc5555a1c95b049e0f1f32 100644 |
| --- a/chrome/android/BUILD.gn |
| +++ b/chrome/android/BUILD.gn |
| @@ -40,6 +40,8 @@ app_hooks_impl = "java/src/org/chromium/chrome/browser/AppHooksImpl.java" |
| if (enable_resource_whitelist_generation) { |
| monochrome_resource_whitelist = |
| "$target_gen_dir/monochrome_resource_whitelist.txt" |
| + monochrome_locale_whitelist = |
| + "$target_gen_dir/monochrome_locale_whitelist.txt" |
| } |
| jinja_template("chrome_public_android_manifest") { |
| @@ -724,9 +726,42 @@ if (current_toolchain == default_toolchain) { |
| "/libmonochrome$shlib_extension.whitelist" |
| output = monochrome_resource_whitelist |
| } |
| + |
| + action("monochrome_locale_whitelist") { |
| + assert(is_android, |
|
agrieve
2017/06/29 01:09:53
nit: No need to assert this. Any file that has and
F
2017/06/29 18:31:20
Done.
|
| + "Resource whitelist currently implemented only on Android") |
| + |
| + script = "//tools/resources/filter_resource_whitelist.py" |
| + |
| + system_webview_pak_whitelist = |
|
agrieve
2017/06/29 01:09:53
nit: prefix with _ so as not not confuse with a pa
F
2017/06/29 18:31:20
Done.
|
| + "$root_gen_dir/android_webview/system_webview_pak_whitelist.txt" |
| + |
| + inputs = [ |
| + monochrome_resource_whitelist, |
| + system_webview_pak_whitelist, |
| + ] |
| + |
| + outputs = [ |
| + monochrome_locale_whitelist, |
| + ] |
| + |
| + deps = [ |
| + ":monochrome_resource_whitelist", |
| + "//android_webview:system_webview_pak_whitelist", |
| + ] |
| + |
| + args = [ |
| + "-i", |
| + rebase_path(monochrome_resource_whitelist, root_build_dir), |
| + "-f", |
| + rebase_path(system_webview_pak_whitelist, root_build_dir), |
| + "-o", |
| + rebase_path(monochrome_locale_whitelist, root_build_dir), |
| + "--out-dir=.", |
| + ] |
| + } |
| } |
| - # This target does not output locale paks. |
| chrome_paks("monochrome_paks") { |
| output_dir = "$target_gen_dir/$target_name" |
| @@ -735,13 +770,26 @@ if (current_toolchain == default_toolchain) { |
| "//android_webview:generate_aw_resources", |
| ] |
| - exclude_locale_paks = true |
| - |
| if (enable_resource_whitelist_generation) { |
| repack_whitelist = monochrome_resource_whitelist |
| deps += [ ":monochrome_resource_whitelist" ] |
| + locale_whitelist = monochrome_locale_whitelist |
| + deps += [ ":monochrome_locale_whitelist" ] |
| } |
| } |
| + |
| + # This target is separate from monochrome_pak_assets because it does not |
| + # disable compression. |
| + android_assets("monochrome_locale_pak_assets") { |
| + sources = [] |
| + foreach(_locale, locales - android_chrome_omitted_locales) { |
| + sources += [ "$target_gen_dir/monochrome_paks/locales/$_locale.pak" ] |
| + } |
| + |
| + deps = [ |
| + ":monochrome_paks", |
| + ] |
| + } |
| # This target explicitly includes locale paks via deps. |
| android_assets("monochrome_pak_assets") { |
| @@ -752,7 +800,7 @@ if (current_toolchain == default_toolchain) { |
| disable_compression = true |
| deps = [ |
| - ":chrome_public_locale_pak_assets", |
| + ":monochrome_locale_pak_assets", |
| ":monochrome_paks", |
| "//android_webview:locale_pak_assets", |
| ] |