Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1913)

Side by Side Diff: google_apis/google_api_keys.cc

Issue 131743018: Add a function for determining if official Google Chrome API key is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « google_apis/google_api_keys.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/google_api_keys.h" 5 #include "google_apis/google_api_keys.h"
6 6
7 // If you add more includes to this list, you also need to add them to 7 // If you add more includes to this list, you also need to add them to
8 // google_api_keys_unittest.cc. 8 // google_api_keys_unittest.cc.
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 std::string GetOAuth2ClientID(OAuth2Client client) { 264 std::string GetOAuth2ClientID(OAuth2Client client) {
265 return g_api_key_cache.Get().GetClientID(client); 265 return g_api_key_cache.Get().GetClientID(client);
266 } 266 }
267 267
268 std::string GetOAuth2ClientSecret(OAuth2Client client) { 268 std::string GetOAuth2ClientSecret(OAuth2Client client) {
269 return g_api_key_cache.Get().GetClientSecret(client); 269 return g_api_key_cache.Get().GetClientSecret(client);
270 } 270 }
271 271
272 bool IsGoogleChromeAPIKeyUsed() {
273 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_OFFICIAL_GOOGLE_API_KEYS)
274 return true;
275 #else
276 return false;
277 #endif
278 }
279
272 } // namespace google_apis 280 } // namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/google_api_keys.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698