summaryrefslogtreecommitdiffstats
path: root/chromium/google_apis/google_api_keys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/google_apis/google_api_keys.cc')
-rw-r--r--chromium/google_apis/google_api_keys.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chromium/google_apis/google_api_keys.cc b/chromium/google_apis/google_api_keys.cc
index 94f6812ab74..f879979bc78 100644
--- a/chromium/google_apis/google_api_keys.cc
+++ b/chromium/google_apis/google_api_keys.cc
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/stringize_macros.h"
+#include "google_apis/gaia/gaia_switches.h"
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_OFFICIAL_GOOGLE_API_KEYS)
#include "google_apis/internal/google_chrome_api_keys.h"
@@ -69,16 +70,6 @@
#define GOOGLE_DEFAULT_CLIENT_SECRET ""
#endif
-namespace switches {
-
-// Specifies custom OAuth2 client id for testing purposes.
-const char kOAuth2ClientID[] = "oauth2-client-id";
-
-// Specifies custom OAuth2 client secret for testing purposes.
-const char kOAuth2ClientSecret[] = "oauth2-client-secret";
-
-} // namespace switches
-
namespace google_apis {
// This is used as a lazy instance to determine keys once and cache them.
@@ -269,4 +260,12 @@ std::string GetOAuth2ClientSecret(OAuth2Client client) {
return g_api_key_cache.Get().GetClientSecret(client);
}
+bool IsGoogleChromeAPIKeyUsed() {
+#if defined(GOOGLE_CHROME_BUILD) || defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+ return true;
+#else
+ return false;
+#endif
+}
+
} // namespace google_apis