summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authornparker <nparker@chromium.org>2015-04-18 06:33:07 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-18 13:33:33 +0000
commit333f169bf09e1c455ea821520010ec8cc9658990 (patch)
tree5cf3ebec106a89440a0e2fd28d045b3064e410e1 /build
parentefeef838abec5ccef45e7c4af1f7f4cf986aa045 (diff)
downloadchromium_src-333f169bf09e1c455ea821520010ec8cc9658990.zip
chromium_src-333f169bf09e1c455ea821520010ec8cc9658990.tar.gz
chromium_src-333f169bf09e1c455ea821520010ec8cc9658990.tar.bz2
Refactor safe-browsing build-config definitions.
Centralize the configuration and break things down into individual sub-systems to enable, rather than referring to feature bundles. I will in a later CL add safe_browsing==3 for enabling XLB on Android, which will define SAFE_BROWSING_DB_REMOTE. When launched, this will replace mode 2. SAFE_BROWSING_SERVICE - enable the browser to talk to the server. SAFE_BROWSING_DB_LOCAL - maintain local database(s) synced from the server. SAFE_BROWSING_DB_REMOTE - talk via API to an external DB (i.e. XLB). SAFE_BROWSING_CSD - client-side phishing detection support. This is nearly a copy of shess@'s 8-month-old https://codereview.chromium.org/397853002/ which was LGTMed. Diffs: Mostly merge conflicts, a rename, and few files added BUG=394379,474608 Review URL: https://codereview.chromium.org/1081403002 Cr-Commit-Position: refs/heads/master@{#325775}
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi21
-rw-r--r--build/config/BUILD.gn9
2 files changed, 30 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index f1303aa..1f01db0 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2995,6 +2995,27 @@
['v8_use_external_startup_data==1', {
'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'],
}],
+
+ # SAFE_BROWSING_SERVICE - browser manages a safe-browsing service.
+ # SAFE_BROWSING_DB_LOCAL - service manages a local database.
+ # SAFE_BROWSING_DB_REMOTE - service talks via API to a database
+ # SAFE_BROWSING_CSD - enable client-side phishing detection.
+ ['safe_browsing==1', {
+ # TODO(nparker): Remove existing uses of FULL_SAFE_BROWSING
+ 'defines': [
+ 'FULL_SAFE_BROWSING',
+ 'SAFE_BROWSING_CSD',
+ 'SAFE_BROWSING_DB_LOCAL',
+ 'SAFE_BROWSING_SERVICE',
+ ],
+ }],
+ ['safe_browsing==2', {
+ 'defines': [
+ # TODO(nparker): Remove existing uses of MOBILE_SAFE_BROWSING
+ 'MOBILE_SAFE_BROWSING',
+ 'SAFE_BROWSING_SERVICE',
+ ],
+ }],
], # conditions for 'target_defaults'
'target_conditions': [
['<(use_libpci)==1', {
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 0140e86..e3d2646 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -234,6 +234,15 @@ config("feature_flags") {
if (enable_video_hole) {
defines += [ "VIDEO_HOLE=1" ]
}
+ if (safe_browsing_mode == 1) {
+ defines += [ "FULL_SAFE_BROWSING" ]
+ defines += [ "SAFE_BROWSING_CSD" ]
+ defines += [ "SAFE_BROWSING_DB_LOCAL" ]
+ defines += [ "SAFE_BROWSING_SERVICE" ]
+ } else if (safe_browsing_mode == 2) {
+ defines += [ "MOBILE_SAFE_BROWSING" ]
+ defines += [ "SAFE_BROWSING_SERVICE" ]
+ }
}
# Debug/release ----------------------------------------------------------------