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

Unified Diff: google_apis/google_api_keys.cc

Issue 19796006: Support service accounts in the chromoting host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update python api keys help script Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/google_api_keys.h ('k') | google_apis/google_api_keys.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/google_api_keys.cc
diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc
index fc4b54735b44042eb79c7845028b37020491ac63..0baf00dc3936c95abc7893c786a1413dd4fd49e6 100644
--- a/google_apis/google_api_keys.cc
+++ b/google_apis/google_api_keys.cc
@@ -49,6 +49,14 @@
#define GOOGLE_CLIENT_SECRET_REMOTING DUMMY_API_TOKEN
#endif
+#if !defined(GOOGLE_CLIENT_ID_REMOTING_HOST)
+#define GOOGLE_CLIENT_ID_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING_HOST)
+#define GOOGLE_CLIENT_SECRET_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
// These are used as shortcuts for developers and users providing
// OAuth credentials via preprocessor defines or environment
// variables. If set, they will be used to replace any of the client
@@ -152,6 +160,21 @@ class APIKeyCache {
default_client_secret,
environment.get(),
command_line);
+
+ client_ids_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+ GOOGLE_CLIENT_ID_REMOTING_HOST,
+ STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING_HOST),
+ NULL,
+ default_client_id,
+ environment.get(),
+ command_line);
+ client_secrets_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+ GOOGLE_CLIENT_SECRET_REMOTING_HOST,
+ STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING_HOST),
+ NULL,
+ default_client_secret,
+ environment.get(),
+ command_line);
}
std::string api_key() const { return api_key_; }
« no previous file with comments | « google_apis/google_api_keys.h ('k') | google_apis/google_api_keys.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698