summaryrefslogtreecommitdiffstats
path: root/google_apis/google_apis.gyp
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 13:10:10 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 13:10:10 +0000
commitd647e280bba804d4589e952015122ff4bd8d3463 (patch)
treee4f6f9e60f452070ae546d0ee088636a2e3e4c37 /google_apis/google_apis.gyp
parentdeaf719cac8855de0bafe3a1db2a9c3ca6791b3d (diff)
downloadchromium_src-d647e280bba804d4589e952015122ff4bd8d3463.zip
chromium_src-d647e280bba804d4589e952015122ff4bd8d3463.tar.gz
chromium_src-d647e280bba804d4589e952015122ff4bd8d3463.tar.bz2
include.gypi variables to specify API keys or use internal header for keys.
BUG=145584 Review URL: https://codereview.chromium.org/10918196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/google_apis.gyp')
-rw-r--r--google_apis/google_apis.gyp31
1 files changed, 31 insertions, 0 deletions
diff --git a/google_apis/google_apis.gyp b/google_apis/google_apis.gyp
index b0b81e4..aa09f4a 100644
--- a/google_apis/google_apis.gyp
+++ b/google_apis/google_apis.gyp
@@ -18,6 +18,37 @@
'../crypto/crypto.gyp:crypto',
'../net/net.gyp:net',
],
+ 'conditions': [
+ ['google_api_key!=""', {
+ 'defines': ['GOOGLE_API_KEY="<(google_api_key)"'],
+ }],
+ # Once the default definitions for the various keys in
+ # google_apis/google_api_keys.cc are all made empty, the next
+ # two conditionals can set just GOOGLE_DEFAULT_CLIENT_ID/SECRET.
+ # Until then, we have different semantics on the gyp variables
+ # google_default_client_id/secret and setting the environment
+ # variables of the (upper-case) same name (the latter are used
+ # as the default for unset client IDs/secrets, whereas the
+ # former overrides all client IDs/secrets).
+ # TODO(joi): Fix the above semantic mismatch once possible.
+ ['google_default_client_id!=""', {
+ 'defines': [
+ 'GOOGLE_CLIENT_ID_MAIN="<(google_default_client_id)"',
+ 'GOOGLE_CLIENT_ID_CLOUD_PRINT="<(google_default_client_id)"',
+ 'GOOGLE_CLIENT_ID_REMOTING="<(google_default_client_id)"',
+ ]
+ }],
+ ['google_default_client_secret!=""', {
+ 'defines': [
+ 'GOOGLE_CLIENT_SECRET_MAIN="<(google_default_client_secret)"',
+ 'GOOGLE_CLIENT_SECRET_CLOUD_PRINT="<(google_default_client_secret)"',
+ 'GOOGLE_CLIENT_SECRET_REMOTING="<(google_default_client_secret)"',
+ ]
+ }],
+ ['use_official_google_api_keys==1', {
+ 'defines': ['USE_OFFICIAL_GOOGLE_API_KEYS=1'],
+ }],
+ ],
'sources': [
'gaia/gaia_auth_consumer.cc',
'gaia/gaia_auth_consumer.h',