Move some global feature defines to buildflags

Moves
  enable_captive_portal_detection
  enable_hangout_services_extension
  enable_plugin_installation
out of the global features.gni files and moves them into chrome/common's
feature flags buildflag header. This increases encapsulation and reduces the
global #defines passed to all compiles.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
TBR=jschuh (render_messages.h)

Review-Url: https://codereview.chromium.org/2405013002
Cr-Original-Commit-Position: refs/heads/master@{#424659}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ab78fefbe385452fae85587b505bcc1bac60a17f
This commit is contained in:
brettw 2016-10-11 19:56:05 -07:00 коммит произвёл Commit bot
Родитель 87ea4e1ce7
Коммит dd411417d1
2 изменённых файлов: 0 добавлений и 17 удалений

Просмотреть файл

@ -196,18 +196,12 @@ config("feature_flags") {
if (enable_themes) {
defines += [ "ENABLE_THEMES=1" ]
}
if (enable_captive_portal_detection) {
defines += [ "ENABLE_CAPTIVE_PORTAL_DETECTION=1" ]
}
if (enable_session_service) {
defines += [ "ENABLE_SESSION_SERVICE=1" ]
}
if (enable_rlz) {
defines += [ "ENABLE_RLZ" ]
}
if (enable_plugin_installation) {
defines += [ "ENABLE_PLUGIN_INSTALLATION=1" ]
}
if (enable_app_list) {
defines += [ "ENABLE_APP_LIST=1" ]
}
@ -226,9 +220,6 @@ config("feature_flags") {
if (proprietary_codecs) {
defines += [ "USE_PROPRIETARY_CODECS" ]
}
if (enable_hangout_services_extension) {
defines += [ "ENABLE_HANGOUT_SERVICES_EXTENSION=1" ]
}
if (safe_browsing_mode == 1) {
defines += [ "FULL_SAFE_BROWSING" ]
defines += [ "SAFE_BROWSING_CSD" ]

Просмотреть файл

@ -53,24 +53,16 @@ declare_args() {
# We always build Google Chrome and Chromecast with proprietary codecs.
proprietary_codecs = is_chrome_branded || is_chromecast
enable_captive_portal_detection = !is_android && !is_ios && !is_chromecast
# Enables use of the session service, which is enabled by default.
# Android stores them separately on the Java side.
enable_session_service = !is_android && !is_ios && !is_chromecast
enable_plugin_installation = is_win || is_mac
enable_app_list = is_chromeos
enable_supervised_users = !is_ios && !is_chromecast
enable_remoting = !is_ios && !is_chromecast
# Hangout services is an extension that adds extra features to Hangouts.
# For official GYP builds, this flag is set.
enable_hangout_services_extension = false
# Variable safe_browsing is used to control the build time configuration for
# 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