diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn index 82d8a5c65416f1..520be6c4bf2c0e 100644 --- a/google_apis/BUILD.gn +++ b/google_apis/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/chrome_build.gni") import("//build/config/features.gni") import("//extensions/buildflags/buildflags.gni") import("//testing/test.gni") @@ -64,7 +65,7 @@ if (use_official_google_api_keys == "") { config("key_defines") { defines = [] - if (use_official_google_api_keys) { + if (is_chrome_branded || use_official_google_api_keys) { defines += [ "USE_OFFICIAL_GOOGLE_API_KEYS=1" ] } if (google_api_key != "") { @@ -140,7 +141,7 @@ template("google_apis_tmpl") { "//services/network/public/cpp", ] - if (use_official_google_api_keys) { + if (is_chrome_branded || use_official_google_api_keys) { deps += [ "internal:generate_metrics_key_header" ] } diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc index d01ef89f6a8681..ff46314dd4ce73 100644 --- a/google_apis/google_api_keys.cc +++ b/google_apis/google_api_keys.cc @@ -23,7 +23,7 @@ #include "google_apis/google_api_keys_mac.h" #endif -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) || defined(USE_OFFICIAL_GOOGLE_API_KEYS) +#if defined(USE_OFFICIAL_GOOGLE_API_KEYS) #include "google_apis/internal/google_chrome_api_keys.h" #include "google_apis/internal/metrics_signing_key.h" #endif @@ -363,7 +363,7 @@ std::string GetSpdyProxyAuthValue() { } bool IsGoogleChromeAPIKeyUsed() { -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) || defined(USE_OFFICIAL_GOOGLE_API_KEYS) +#if defined(USE_OFFICIAL_GOOGLE_API_KEYS) return true; #else return false; diff --git a/google_apis/google_api_keys_unittest.cc b/google_apis/google_api_keys_unittest.cc index 669be144d6dfb6..d92b237cf82672 100644 --- a/google_apis/google_api_keys_unittest.cc +++ b/google_apis/google_api_keys_unittest.cc @@ -89,7 +89,7 @@ void GoogleAPIKeysTest::TearDown() { // This is the default baked-in value for OAuth IDs and secrets. static const char kDummyToken[] = "dummytoken"; -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) || defined(USE_OFFICIAL_GOOGLE_API_KEYS) +#if defined(USE_OFFICIAL_GOOGLE_API_KEYS) // Test official build behavior, since we are in a checkout where this // is possible. namespace official_build {