Commit be2fb3d7 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Revert "Add SODA API Key"

This reverts commit b01fb516.

Reason for revert: causes crashes on chrome-branded CrOS builds
See crbug.com/1108123#c2 for details.

Original change's description:
> Add SODA API Key
> 
> This CL adds an API key for the Speech On-Device API (SODA). Usage of
> the API key is outlined here: go/securing-soda-on-chrome.
> 
> Bug: 1107615
> Change-Id: Ic92418407e17a88426559251e77797bd0b34818b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309133
> Reviewed-by: David Roger <droger@chromium.org>
> Commit-Queue: Evan Liu <evliu@google.com>
> Cr-Commit-Position: refs/heads/master@{#790550}

TBR=droger@chromium.org,evliu@google.com

Change-Id: I64f9e46714ca6675e74702dc1d1a446d873ed741
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1107615, 1108123
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2311077Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790686}
parent ec384daa
...@@ -90,11 +90,6 @@ ...@@ -90,11 +90,6 @@
#define GOOGLE_API_KEY_SHARING DUMMY_API_TOKEN #define GOOGLE_API_KEY_SHARING DUMMY_API_TOKEN
#endif #endif
// API key for the Speech On-Device API (SODA).
#if !defined(GOOGLE_API_KEY_SODA)
#define GOOGLE_API_KEY_SODA DUMMY_API_TOKEN
#endif
// These are used as shortcuts for developers and users providing // These are used as shortcuts for developers and users providing
// OAuth credentials via preprocessor defines or environment // OAuth credentials via preprocessor defines or environment
// variables. If set, they will be used to replace any of the client // variables. If set, they will be used to replace any of the client
...@@ -143,10 +138,6 @@ class APIKeyCache { ...@@ -143,10 +138,6 @@ class APIKeyCache {
GOOGLE_API_KEY_SHARING, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SHARING), GOOGLE_API_KEY_SHARING, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SHARING),
nullptr, std::string(), environment.get(), command_line, gaia_config); nullptr, std::string(), environment.get(), command_line, gaia_config);
api_key_soda_ = CalculateKeyValue(
GOOGLE_API_KEY_SODA, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SODA),
nullptr, std::string(), environment.get(), command_line, gaia_config);
metrics_key_ = CalculateKeyValue( metrics_key_ = CalculateKeyValue(
GOOGLE_METRICS_SIGNING_KEY, GOOGLE_METRICS_SIGNING_KEY,
STRINGIZE_NO_EXPANSION(GOOGLE_METRICS_SIGNING_KEY), nullptr, STRINGIZE_NO_EXPANSION(GOOGLE_METRICS_SIGNING_KEY), nullptr,
...@@ -212,7 +203,6 @@ class APIKeyCache { ...@@ -212,7 +203,6 @@ class APIKeyCache {
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 api_key_remoting() const { return api_key_remoting_; }
std::string api_key_sharing() const { return api_key_sharing_; } std::string api_key_sharing() const { return api_key_sharing_; }
std::string api_key_soda() const { return api_key_soda_; }
std::string metrics_key() const { return metrics_key_; } std::string metrics_key() const { return metrics_key_; }
...@@ -323,7 +313,6 @@ class APIKeyCache { ...@@ -323,7 +313,6 @@ class APIKeyCache {
std::string api_key_non_stable_; std::string api_key_non_stable_;
std::string api_key_remoting_; std::string api_key_remoting_;
std::string api_key_sharing_; std::string api_key_sharing_;
std::string api_key_soda_;
std::string metrics_key_; std::string metrics_key_;
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];
...@@ -352,10 +341,6 @@ std::string GetSharingAPIKey() { ...@@ -352,10 +341,6 @@ std::string GetSharingAPIKey() {
return g_api_key_cache.Get().api_key_sharing(); return g_api_key_cache.Get().api_key_sharing();
} }
std::string GetSodaAPIKey() {
return g_api_key_cache.Get().api_key_soda();
}
#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);
......
...@@ -80,9 +80,6 @@ std::string GetRemotingAPIKey(); ...@@ -80,9 +80,6 @@ std::string GetRemotingAPIKey();
// Retrieves the Sharing API Key. // Retrieves the Sharing API Key.
std::string GetSharingAPIKey(); std::string GetSharingAPIKey();
// Retrieves the Speech On-Device API (SODA) API Key.
std::string GetSodaAPIKey();
#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.
......
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