summaryrefslogtreecommitdiffstats
path: root/google_apis/google_api_keys.cc
diff options
context:
space:
mode:
authorrmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-16 05:18:38 +0000
committerrmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-16 05:18:38 +0000
commitd66d817427d21599245fedf4c60c6472be4b3552 (patch)
treeb47b19d9d38b4f515951cf7f2a70070a9a9a7138 /google_apis/google_api_keys.cc
parent788e9517ef2bef436cac7267dd75d5f356d35975 (diff)
downloadchromium_src-d66d817427d21599245fedf4c60c6472be4b3552.zip
chromium_src-d66d817427d21599245fedf4c60c6472be4b3552.tar.gz
chromium_src-d66d817427d21599245fedf4c60c6472be4b3552.tar.bz2
Support service accounts in the chromoting host.
This change allows running a host *already configured* with service account credentials. Support for obtaining service account credentails during host setup will come in follow up CLs. BUG=224742 Review URL: https://chromiumcodereview.appspot.com/19796006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217941 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/google_api_keys.cc')
-rw-r--r--google_apis/google_api_keys.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc
index fc4b547..0baf00d 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_; }