Commit 3596104c authored by sanfin's avatar sanfin Committed by Commit bot

Better handle safe_browsing logic in build dependencies.

//chrome/browser/resources was depending on targets only needed
if safe_browsing_mode != 0. Also rearrange the logic in
build/config/features.gni to turn off safe_browsing on all
Chromecast builds, including those for Android TV.

BUG=internal b/31340856

Review-Url: https://codereview.chromium.org/2360853002
Cr-Commit-Position: refs/heads/master@{#420751}
parent ac08f57b
......@@ -79,10 +79,10 @@ declare_args() {
# safe browsing feature. Safe browsing can be compiled in 3 different levels:
# 0 disables it, 1 enables it fully, and 2 enables mobile protection via an
# external API.
if (is_android) {
safe_browsing_mode = 2
} else if (is_ios || is_chromecast) {
if (is_ios || is_chromecast) {
safe_browsing_mode = 0
} else if (is_android) {
safe_browsing_mode = 2
} else {
safe_browsing_mode = 1
}
......
......@@ -3925,7 +3925,6 @@ grit("resources") {
deps = [
":chrome_internal_resources_gen",
"//chrome/browser/resources/safe_browsing:make_file_types_protobuf",
# Depend only on the generated mojo bindings since we read the .mojom.js
# file, rather than the whole mojo target which will link the C++ bindings.
......@@ -3936,6 +3935,11 @@ grit("resources") {
"//url/mojo:url_mojom_gurl__generator",
"//url/mojo:url_mojom_origin__generator",
]
if (safe_browsing_mode > 0) {
deps +=
[ "//chrome/browser/resources/safe_browsing:make_file_types_protobuf" ]
}
}
if (is_chrome_branded) {
......
......@@ -112,7 +112,9 @@
<include name="IDR_DOMAIN_RELIABILITY_INTERNALS_HTML" file="resources\domain_reliability_internals.html" compress="gzip" type="BINDATA" />
<include name="IDR_DOMAIN_RELIABILITY_INTERNALS_CSS" file="resources\domain_reliability_internals.css" compress="gzip" type="BINDATA" />
<include name="IDR_DOMAIN_RELIABILITY_INTERNALS_JS" file="resources\domain_reliability_internals.js" compress="gzip" type="BINDATA" />
<if expr="safe_browsing_mode != 0">
<include name="IDR_DOWNLOAD_FILE_TYPES_PB" file="${root_gen_dir}\chrome\browser\resources\safe_browsing\download_file_types.pb" use_base_dir="false" type="BINDATA" />
</if>
<if expr="not is_android">
<include name="IDR_MD_DOWNLOADS_1X_INCOGNITO_MARKER_PNG" file="resources\md_downloads\1x\incognito_marker.png" type="BINDATA" />
<include name="IDR_MD_DOWNLOADS_2X_INCOGNITO_MARKER_PNG" file="resources\md_downloads\2x\incognito_marker.png" type="BINDATA" />
......
......@@ -8,6 +8,7 @@
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
# Please keep features in alphabetical order.
declare_args() {
......@@ -58,5 +59,6 @@ chrome_grit_defines = [
"enable_google_now=$enable_google_now",
"enable_hotwording=$enable_hotwording",
"enable_vr_shell=$enable_vr_shell",
"safe_browsing_mode=$safe_browsing_mode",
"use_vulcanize=$use_vulcanize",
]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment