| Index: google_apis/google_api_keys.cc
|
| diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc
|
| index 640b2ad3e52de4be503c7890bd0dc1d633b85c0f..60f0b3072fe78623d3e3a32fca49c8f3ad454a55 100644
|
| --- a/google_apis/google_api_keys.cc
|
| +++ b/google_apis/google_api_keys.cc
|
| @@ -26,6 +26,10 @@
|
| #define GOOGLE_API_KEY DUMMY_API_TOKEN
|
| #endif
|
|
|
| +#if !defined(GOOGLE_API_KEY_SAFESITES)
|
| +#define GOOGLE_API_KEY_SAFESITES DUMMY_API_TOKEN
|
| +#endif
|
| +
|
| #if !defined(GOOGLE_CLIENT_ID_MAIN)
|
| #define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN
|
| #endif
|
| @@ -86,6 +90,14 @@ class APIKeyCache {
|
| environment.get(),
|
| command_line);
|
|
|
| + api_key_safesites_ =
|
| + CalculateKeyValue(GOOGLE_API_KEY_SAFESITES,
|
| + STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SAFESITES),
|
| + NULL,
|
| + std::string(),
|
| + environment.get(),
|
| + command_line);
|
| +
|
| std::string default_client_id =
|
| CalculateKeyValue(GOOGLE_DEFAULT_CLIENT_ID,
|
| STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID),
|
| @@ -169,6 +181,7 @@ class APIKeyCache {
|
| }
|
|
|
| std::string api_key() const { return api_key_; }
|
| + std::string api_key_safesites() const { return api_key_safesites_; }
|
|
|
| std::string GetClientID(OAuth2Client client) const {
|
| DCHECK_LT(client, CLIENT_NUM_ITEMS);
|
| @@ -234,6 +247,7 @@ class APIKeyCache {
|
| }
|
|
|
| std::string api_key_;
|
| + std::string api_key_safesites_;
|
| std::string client_ids_[CLIENT_NUM_ITEMS];
|
| std::string client_secrets_[CLIENT_NUM_ITEMS];
|
| };
|
| @@ -260,6 +274,10 @@ std::string GetAPIKey() {
|
| return g_api_key_cache.Get().api_key();
|
| }
|
|
|
| +std::string GetSafeSitesAPIKey() {
|
| + return g_api_key_cache.Get().api_key_safesites();
|
| +}
|
| +
|
| std::string GetOAuth2ClientID(OAuth2Client client) {
|
| return g_api_key_cache.Get().GetClientID(client);
|
| }
|
|
|