Index: components/resources/enhanced_bookmarks/BUILD.gn |
diff --git a/components/resources/enhanced_bookmarks/BUILD.gn b/components/resources/enhanced_bookmarks/BUILD.gn |
index 9c95b0bb07578c4b6309072ddef07a63f4913cf5..1de2d9c17cfcae2fbe469b339dfa27f937bc4d5f 100644 |
--- a/components/resources/enhanced_bookmarks/BUILD.gn |
+++ b/components/resources/enhanced_bookmarks/BUILD.gn |
@@ -4,7 +4,44 @@ |
import("//tools/grit/grit_rule.gni") |
-closure_out_dir = "$root_gen_dir/closure/components/resources/enhanced_bookmarks" |
+closure_out_dir = |
+ "$root_gen_dir/closure/components/resources/enhanced_bookmarks" |
+ |
+closure_args = [ |
+ "accept_const_keyword", |
+ "compilation_level=SIMPLE_OPTIMIZATIONS", |
+ "extra_annotation_name=attribute", |
+ "extra_annotation_name=element", |
+ "extra_annotation_name=group", |
+ "extra_annotation_name=homepage", |
+ "extra_annotation_name=status", |
+ "extra_annotation_name=submodule", |
+ "jscomp_error=accessControls", |
+ "jscomp_error=ambiguousFunctionDecl", |
+ "jscomp_error=checkStructDictInheritance", |
+ "jscomp_error=checkTypes", |
+ "jscomp_error=checkVars", |
+ "jscomp_error=constantProperty", |
+ "jscomp_error=deprecated", |
+ "jscomp_error=externsValidation", |
+ "jscomp_error=globalThis", |
+ "jscomp_error=invalidCasts", |
+ "jscomp_error=missingProperties", |
+ "jscomp_error=missingReturn", |
+ "jscomp_error=nonStandardJsDocs", |
+ "jscomp_error=suspiciousCode", |
+ "jscomp_error=undefinedNames", |
+ "jscomp_error=undefinedVars", |
+ "jscomp_error=unknownDefines", |
+ "jscomp_error=uselessCode", |
+ "jscomp_error=visibility", |
+ "jscomp_off=duplicate", |
+ "jscomp_off=misplacedTypeAnnotation", |
+ "language_in=ECMASCRIPT5_STRICT", |
+ "polymer_pass", |
+ "source_map_format=V3", |
+ "summary_detail_level=3", |
+] |
# GYP version: components/resources/enhanced_bookmarks/enhanced_bookmarks_resources.gyp |
# (generate_enhanced_bookmarks_resources action) |
@@ -38,7 +75,7 @@ grit("enhanced_bookmarks_resources") { |
import("//third_party/document_image_extractor/document_image_extractor.gni") |
rebased_closure_out_dir = rebase_path(root_gen_dir, "../") + |
- "/closure/components/resources/enhanced_bookmarks/" |
+ "/closure/components/resources/enhanced_bookmarks/" |
action("document_image_extractor") { |
script = "//third_party/closure_compiler/compile.py" |
@@ -52,15 +89,11 @@ action("document_image_extractor") { |
document_image_extractor_sources = |
rebase_path(document_image_extractor_js_files, "third_party/", "../") |
- args = |
- [ "../../components/resources/enhanced_bookmarks/get_salient_image_url.js" ] + |
- document_image_extractor_sources + |
- [ |
- "--out_file=${rebased_closure_out_dir}/get_salient_image_url.js", |
+ args = [ "../../components/resources/enhanced_bookmarks/get_salient_image_url.js" ] + document_image_extractor_sources + [ |
+ "--out-file=${rebased_closure_out_dir}/get_salient_image_url.js", |
"--no-single-file", |
- "--output_wrapper", |
- "(function(){%output% return GetSalientImageUrl();})();", |
- ] |
+ "--closure-args", |
+ ] + closure_args + [ "output_wrapper='(function(){%output% return GetSalientImageUrl();})();'" ] |
} |
action("dom_initializer") { |
@@ -79,9 +112,8 @@ action("dom_initializer") { |
[ "../../components/resources/enhanced_bookmarks/dom_initializer.js" ] + |
dom_controller_sources + |
[ |
- "--out_file=${rebased_closure_out_dir}/dom_initializer.js", |
+ "--out-file=${rebased_closure_out_dir}/dom_initializer.js", |
"--no-single-file", |
- "--output_wrapper", |
- "(function(){%output%})();", |
- ] |
+ "--closure-args", |
+ ] + closure_args + [ "output_wrapper='(function(){%output%})();'" ] |
} |