diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 22:27:58 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 22:27:58 +0000 |
commit | d3340bf51a890f48cfb211e6268a0c92aabadad4 (patch) | |
tree | 72c964ce854da9edda0c5bca7a9fb8d4d74ca51d | |
parent | 6d6e2c41163ea9209283dc4e252e05bd12540466 (diff) | |
download | chromium_src-d3340bf51a890f48cfb211e6268a0c92aabadad4.zip chromium_src-d3340bf51a890f48cfb211e6268a0c92aabadad4.tar.gz chromium_src-d3340bf51a890f48cfb211e6268a0c92aabadad4.tar.bz2 |
provide a build time flag to enable connecting to production wallet servers by default
This flag defaults to true for official builds and false for unofficial builds. If the flag is false, Chromium will connect to sandbox wallet servers.
Net effect: instead of being controller by Chrome vs. Chromium, the default is controlled by Official vs. Unofficial buildtype.
BUG=334088
Review URL: https://codereview.chromium.org/288003004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272348 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 16 | ||||
-rw-r--r-- | components/autofill/content/browser/wallet/wallet_service_url.cc | 7 |
2 files changed, 16 insertions, 7 deletions
diff --git a/build/common.gypi b/build/common.gypi index 75693e3..d974a8e 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -468,6 +468,10 @@ # Enables autofill dialog and associated features; disabled by default. 'enable_autofill_dialog%' : 0, + # Defaults Wallet integration in Autofill dialog to use production + # servers. Unofficial builds won't have the proper API keys. + 'enable_prod_wallet_service%': 0, + # Enables support for background apps. 'enable_background%': 1, @@ -697,7 +701,13 @@ # Enable autofill dialog for Android, Mac and Views-enabled platforms. ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', { - 'enable_autofill_dialog%': 1 + 'enable_autofill_dialog%': 1, + + 'conditions': [ + ['buildtype=="Official"', { + 'enable_prod_wallet_service%': 1, + }], + ] }], ['OS=="android"', { @@ -1039,6 +1049,7 @@ 'enable_session_service%': '<(enable_session_service)', 'enable_themes%': '<(enable_themes)', 'enable_autofill_dialog%': '<(enable_autofill_dialog)', + 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)', 'enable_background%': '<(enable_background)', 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)', @@ -2606,6 +2617,9 @@ ['enable_autofill_dialog==1', { 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], }], + ['enable_prod_wallet_service==1', { + 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'], + }], ['enable_background==1', { 'defines': ['ENABLE_BACKGROUND=1'], }], diff --git a/components/autofill/content/browser/wallet/wallet_service_url.cc b/components/autofill/content/browser/wallet/wallet_service_url.cc index 310b927..8bd9926 100644 --- a/components/autofill/content/browser/wallet/wallet_service_url.cc +++ b/components/autofill/content/browser/wallet/wallet_service_url.cc @@ -44,14 +44,9 @@ bool IsWalletProductionEnabled() { if (command_line->HasSwitch(::switches::kReduceSecurityForTesting)) return false; - // TODO(estade): add a build-time flag for Chromium distros to enable this - // rather than checking for an official build. http://crbug.com/334088 -#if defined(GOOGLE_CHROME_BUILD) - // Default to prod for official builds. +#if defined(ENABLE_PROD_WALLET_SERVICE) return true; #else - // Unofficial builds don't have the proper API keys for production Wallet - // servers. return false; #endif } |