diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 19:57:19 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 19:57:19 +0000 |
commit | 6a7caecdde50da45cc993a7c98eb40066a0f41e9 (patch) | |
tree | ef4e36497d86a059a4415889a727d5f495eb724d /google_apis | |
parent | c583b71f5167f4e73e6dcbdbda72d96d9807e3e7 (diff) | |
download | chromium_src-6a7caecdde50da45cc993a7c98eb40066a0f41e9.zip chromium_src-6a7caecdde50da45cc993a7c98eb40066a0f41e9.tar.gz chromium_src-6a7caecdde50da45cc993a7c98eb40066a0f41e9.tar.bz2 |
Cleaning up TODOs in //google_apis.
The build warning is no longer necessary as we now have an infobar
show up to warn developers if API keys haven't been set.
The Python API may never need to be better than it is today, so
removing the TODO there; it will be improved if and when needed.
The underlying reason for the inconsistent semantics between setting
the GOOGLE_DEFAULT_CLIENT_ID/SECRET environment variables and the
google_default_client_id/secret gyp variables is gone, so I fixed this
mismatch in the current change.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/18851002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/google_api_keys.cc | 16 | ||||
-rwxr-xr-x | google_apis/google_api_keys.py | 8 | ||||
-rw-r--r-- | google_apis/google_apis.gyp | 17 |
3 files changed, 5 insertions, 36 deletions
diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc index 034b69a..fc4b547 100644 --- a/google_apis/google_api_keys.cc +++ b/google_apis/google_api_keys.cc @@ -17,22 +17,6 @@ #include "google_apis/internal/google_chrome_api_keys.h" #endif -// TODO(joi): Can we enable this warning without having it treated as -// an error? We don't want to fail builds, just warn, but all warnings -// from the preprocessor are currently treated as errors, at least in -// Linux builds. -#if 0 -#if !defined(GOOGLE_API_KEY) && ( \ - (!defined(GOOGLE_DEFAULT_CLIENT_ID) && \ - !defined(GOOGLE_DEFAULT_CLIENT_SECRET)) \ - || \ - (!defined(GOOGLE_CLIENT_ID_MAIN) && \ - !defined(GOOGLE_CLIENT_SECRET_MAIN))) -#warning You have not specified API keys; some features may not work. -#warning See www.chromium.org/developers/how-tos/api-keys for details. -#endif // (API keys unset) -#endif // 0 - // Used to indicate an unset key/id/secret. This works better with // various unit tests than leaving the token empty. #define DUMMY_API_TOKEN "dummytoken" diff --git a/google_apis/google_api_keys.py b/google_apis/google_api_keys.py index d29fe35..6776aae 100755 --- a/google_apis/google_api_keys.py +++ b/google_apis/google_api_keys.py @@ -5,11 +5,9 @@ """Python API for retrieving API keys. -Note that this cannot have the exact same semantics (at the moment) as -the C++ API in google_api_keys.h, since it does not have access to gyp -variables or preprocessor defines. - -TODO(joi): Give this have the same semantics as the C++ API. +Note that this does not have the exact same semantics as the C++ API +in google_api_keys.h, since it does not have access to gyp variables +or preprocessor defines. """ import os diff --git a/google_apis/google_apis.gyp b/google_apis/google_apis.gyp index 02a1275..c67232f 100644 --- a/google_apis/google_apis.gyp +++ b/google_apis/google_apis.gyp @@ -25,27 +25,14 @@ ['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_ID="<(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)"', + 'GOOGLE_DEFAULT_CLIENT_SECRET="<(google_default_client_secret)"', ] }], [ 'OS == "android"', { |