Commit e8f9d07d authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

Remove Remoting API Key

Chromoting host no longer needs API Key, so the key can be removed.

Change-Id: I0960660ce2ddd5f4352ab691468d7c3881530d8d
Reviewed-on: https://chromium-review.googlesource.com/540035Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480940}
parent 2aea1761
...@@ -34,10 +34,6 @@ ...@@ -34,10 +34,6 @@
#define GOOGLE_API_KEY DUMMY_API_TOKEN #define GOOGLE_API_KEY DUMMY_API_TOKEN
#endif #endif
#if !defined(GOOGLE_API_KEY_REMOTING)
#define GOOGLE_API_KEY_REMOTING DUMMY_API_TOKEN
#endif
#if !defined(GOOGLE_CLIENT_ID_MAIN) #if !defined(GOOGLE_CLIENT_ID_MAIN)
#define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN #define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN
#endif #endif
...@@ -115,14 +111,6 @@ class APIKeyCache { ...@@ -115,14 +111,6 @@ class APIKeyCache {
api_key_non_stable_ = api_key_; api_key_non_stable_ = api_key_;
#endif #endif
api_key_remoting_ =
CalculateKeyValue(GOOGLE_API_KEY_REMOTING,
STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_REMOTING),
NULL,
std::string(),
environment.get(),
command_line);
std::string default_client_id = std::string default_client_id =
CalculateKeyValue(GOOGLE_DEFAULT_CLIENT_ID, CalculateKeyValue(GOOGLE_DEFAULT_CLIENT_ID,
STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID),
...@@ -210,7 +198,6 @@ class APIKeyCache { ...@@ -210,7 +198,6 @@ class APIKeyCache {
void set_api_key(const std::string& api_key) { api_key_ = api_key; } void set_api_key(const std::string& api_key) { api_key_ = api_key; }
#endif #endif
std::string api_key_non_stable() const { return api_key_non_stable_; } std::string api_key_non_stable() const { return api_key_non_stable_; }
std::string api_key_remoting() const { return api_key_remoting_; }
std::string GetClientID(OAuth2Client client) const { std::string GetClientID(OAuth2Client client) const {
DCHECK_LT(client, CLIENT_NUM_ITEMS); DCHECK_LT(client, CLIENT_NUM_ITEMS);
...@@ -299,7 +286,6 @@ class APIKeyCache { ...@@ -299,7 +286,6 @@ class APIKeyCache {
std::string api_key_; std::string api_key_;
std::string api_key_non_stable_; std::string api_key_non_stable_;
std::string api_key_remoting_;
std::string client_ids_[CLIENT_NUM_ITEMS]; std::string client_ids_[CLIENT_NUM_ITEMS];
std::string client_secrets_[CLIENT_NUM_ITEMS]; std::string client_secrets_[CLIENT_NUM_ITEMS];
}; };
...@@ -330,10 +316,6 @@ std::string GetNonStableAPIKey() { ...@@ -330,10 +316,6 @@ std::string GetNonStableAPIKey() {
return g_api_key_cache.Get().api_key_non_stable(); return g_api_key_cache.Get().api_key_non_stable();
} }
std::string GetRemotingAPIKey() {
return g_api_key_cache.Get().api_key_remoting();
}
#if defined(OS_IOS) #if defined(OS_IOS)
void SetAPIKey(const std::string& api_key) { void SetAPIKey(const std::string& api_key) {
g_api_key_cache.Get().set_api_key(api_key); g_api_key_cache.Get().set_api_key(api_key);
......
...@@ -71,8 +71,6 @@ std::string GetAPIKey(); ...@@ -71,8 +71,6 @@ std::string GetAPIKey();
// Non-stable channels may have a different Google API key. // Non-stable channels may have a different Google API key.
std::string GetNonStableAPIKey(); std::string GetNonStableAPIKey();
std::string GetRemotingAPIKey();
#if defined(OS_IOS) #if defined(OS_IOS)
// Sets the API key. This should be called as early as possible before this // Sets the API key. This should be called as early as possible before this
// API key is even accessed. // API key is even accessed.
......
...@@ -75,11 +75,6 @@ def GetAPIKeyPhysicalWebTest(): ...@@ -75,11 +75,6 @@ def GetAPIKeyPhysicalWebTest():
return _GetToken('GOOGLE_API_KEY_PHYSICAL_WEB_TEST') return _GetToken('GOOGLE_API_KEY_PHYSICAL_WEB_TEST')
def GetAPIKeyRemoting():
"""Returns the simple API key."""
return _GetToken('GOOGLE_API_KEY_REMOTING')
def GetClientID(client_name): def GetClientID(client_name):
"""Returns the OAuth 2.0 client ID for the client of the given name.""" """Returns the OAuth 2.0 client ID for the client of the given name."""
return _GetToken('GOOGLE_CLIENT_ID_%s' % client_name) return _GetToken('GOOGLE_CLIENT_ID_%s' % client_name)
...@@ -92,7 +87,6 @@ def GetClientSecret(client_name): ...@@ -92,7 +87,6 @@ def GetClientSecret(client_name):
if __name__ == "__main__": if __name__ == "__main__":
print 'GOOGLE_API_KEY=%s' % GetAPIKey() print 'GOOGLE_API_KEY=%s' % GetAPIKey()
print 'GOOGLE_API_KEY_REMOTING=%s' % GetAPIKeyRemoting()
print 'GOOGLE_CLIENT_ID_MAIN=%s' % GetClientID('MAIN') print 'GOOGLE_CLIENT_ID_MAIN=%s' % GetClientID('MAIN')
print 'GOOGLE_CLIENT_SECRET_MAIN=%s' % GetClientSecret('MAIN') print 'GOOGLE_CLIENT_SECRET_MAIN=%s' % GetClientSecret('MAIN')
print 'GOOGLE_CLIENT_ID_CLOUD_PRINT=%s' % GetClientID('CLOUD_PRINT') print 'GOOGLE_CLIENT_ID_CLOUD_PRINT=%s' % GetClientID('CLOUD_PRINT')
......
...@@ -293,7 +293,6 @@ def buildWebApp(buildtype, version, destination, zip_path, ...@@ -293,7 +293,6 @@ def buildWebApp(buildtype, version, destination, zip_path,
# For overriding the client ID/secret via env vars, see google_api_keys.py. # For overriding the client ID/secret via env vars, see google_api_keys.py.
apiClientId = google_api_keys.GetClientID('REMOTING') apiClientId = google_api_keys.GetClientID('REMOTING')
apiClientSecret = google_api_keys.GetClientSecret('REMOTING') apiClientSecret = google_api_keys.GetClientSecret('REMOTING')
apiKey = google_api_keys.GetAPIKeyRemoting()
apiClientIdV2 = os.environ.get( apiClientIdV2 = os.environ.get(
'REMOTING_IDENTITY_API_CLIENT_ID', 'REMOTING_IDENTITY_API_CLIENT_ID',
...@@ -301,7 +300,6 @@ def buildWebApp(buildtype, version, destination, zip_path, ...@@ -301,7 +300,6 @@ def buildWebApp(buildtype, version, destination, zip_path,
replaceString(destination, 'API_CLIENT_ID', apiClientId) replaceString(destination, 'API_CLIENT_ID', apiClientId)
replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret) replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret)
replaceString(destination, 'API_KEY', apiKey)
# Use a fixed key in the app manifest. For dev builds, this ensures that the # Use a fixed key in the app manifest. For dev builds, this ensures that the
# app can be run directly from the output directory. For official CRD builds, # app can be run directly from the output directory. For official CRD builds,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment