[Refactoring] Rename GOOGLE_API_KEY_PHYSICAL_WEB_TEST api key
This cl renames GOOGLE_API_KEY_PHYSICAL_WEB_TEST to
GOOGLE_API_KEY_ANDROID_NON_STABLE. The old api key is still used in
internal code. So a reference to it is still kept in
java_google_api_keys.py file. This reference will be removed after the
internal code is refactored.
Bug: 1203339
Change-Id: I4ec36a6fb8687546a5141ecd14a0e27387f23374
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3263874
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942153}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
bfd00a1cd4
commit
48ece0a282
@ -95,8 +95,10 @@ def _DoMain(argv):
|
||||
|
||||
values = {}
|
||||
values['GOOGLE_API_KEY'] = google_api_keys.GetAPIKey()
|
||||
values['GOOGLE_API_KEY_PHYSICAL_WEB_TEST'] = (google_api_keys.
|
||||
GetAPIKeyPhysicalWebTest())
|
||||
values['GOOGLE_API_KEY_PHYSICAL_WEB_TEST'] = (
|
||||
google_api_keys.GetAPIKeyAndroidNonStable())
|
||||
values['GOOGLE_API_KEY_ANDROID_NON_STABLE'] = (
|
||||
google_api_keys.GetAPIKeyAndroidNonStable())
|
||||
values['GOOGLE_CLIENT_ID_MAIN'] = google_api_keys.GetClientID('MAIN')
|
||||
values['GOOGLE_CLIENT_SECRET_MAIN'] = google_api_keys.GetClientSecret('MAIN')
|
||||
values['GOOGLE_CLIENT_ID_CLOUD_PRINT'] = google_api_keys.GetClientID(
|
||||
|
@ -74,11 +74,8 @@
|
||||
#define GOOGLE_CLIENT_SECRET_REMOTING_HOST DUMMY_API_TOKEN
|
||||
#endif
|
||||
|
||||
// This is really the API key for non-stable channels on Android. It's
|
||||
// named after the first feature that used it.
|
||||
// TODO(jkrcal,rogerta): Rename this to GOOGLE_API_KEY_ANDROID_NON_STABLE.
|
||||
#if !defined(GOOGLE_API_KEY_PHYSICAL_WEB_TEST)
|
||||
#define GOOGLE_API_KEY_PHYSICAL_WEB_TEST DUMMY_API_TOKEN
|
||||
#if !defined(GOOGLE_API_KEY_ANDROID_NON_STABLE)
|
||||
#define GOOGLE_API_KEY_ANDROID_NON_STABLE DUMMY_API_TOKEN
|
||||
#endif
|
||||
|
||||
#if !defined(GOOGLE_API_KEY_REMOTING)
|
||||
@ -132,8 +129,8 @@ class APIKeyCache {
|
||||
// A special non-stable key is at the moment defined only for Android Chrome.
|
||||
#if defined(OS_ANDROID)
|
||||
api_key_non_stable_ = CalculateKeyValue(
|
||||
GOOGLE_API_KEY_PHYSICAL_WEB_TEST,
|
||||
STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_PHYSICAL_WEB_TEST), nullptr,
|
||||
GOOGLE_API_KEY_ANDROID_NON_STABLE,
|
||||
STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_ANDROID_NON_STABLE), nullptr,
|
||||
std::string(), environment.get(), command_line, gaia_config);
|
||||
#else
|
||||
api_key_non_stable_ = api_key_;
|
||||
|
@ -72,9 +72,9 @@ def GetAPIKey():
|
||||
return _GetToken('GOOGLE_API_KEY')
|
||||
|
||||
|
||||
def GetAPIKeyPhysicalWebTest():
|
||||
"""Returns the API key to test Physical Web service."""
|
||||
return _GetToken('GOOGLE_API_KEY_PHYSICAL_WEB_TEST')
|
||||
def GetAPIKeyAndroidNonStable():
|
||||
"""Returns the API key for android non-stable channel."""
|
||||
return _GetToken('GOOGLE_API_KEY_ANDROID_NON_STABLE')
|
||||
|
||||
|
||||
def GetClientID(client_name):
|
||||
|
Reference in New Issue
Block a user