summaryrefslogtreecommitdiffstats
path: root/content/browser/speech/google_streaming_remote_engine.cc
diff options
context:
space:
mode:
authorprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-08 11:27:40 +0000
committerprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-08 11:27:40 +0000
commitfe3f8f6ac9d1f0114447e26f1c9acd064e5ea428 (patch)
tree5be3e819c3a55560b8f6ac29bb6b484ec3dbd4a8 /content/browser/speech/google_streaming_remote_engine.cc
parenteabaf45cf33e295367511021cc760d0174e9ef89 (diff)
downloadchromium_src-fe3f8f6ac9d1f0114447e26f1c9acd064e5ea428.zip
chromium_src-fe3f8f6ac9d1f0114447e26f1c9acd064e5ea428.tar.gz
chromium_src-fe3f8f6ac9d1f0114447e26f1c9acd064e5ea428.tar.bz2
Remove the --speech-service-key command line flag.
It is not used anymore. The standard API keys workflow should be used instead. See http://www.chromium.org/developers/how-tos/api-keys. BUG=350333 Review URL: https://codereview.chromium.org/189603005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255749 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech/google_streaming_remote_engine.cc')
-rw-r--r--content/browser/speech/google_streaming_remote_engine.cc20
1 files changed, 2 insertions, 18 deletions
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc
index 89bfdcd..88a461a 100644
--- a/content/browser/speech/google_streaming_remote_engine.cc
+++ b/content/browser/speech/google_streaming_remote_engine.cc
@@ -7,7 +7,6 @@
#include <vector>
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -69,21 +68,6 @@ void DumpResponse(const std::string& response) {
}
}
-std::string GetAPIKey() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kSpeechRecognitionWebserviceKey)) {
- DVLOG(1) << "GetAPIKey() used key from command-line.";
- return command_line.GetSwitchValueASCII(
- switches::kSpeechRecognitionWebserviceKey);
- }
-
- std::string api_key = google_apis::GetAPIKey();
- if (api_key.empty())
- DVLOG(1) << "GetAPIKey() returned empty string!";
-
- return api_key;
-}
-
} // namespace
const int GoogleStreamingRemoteEngine::kAudioPacketIntervalMs = 100;
@@ -317,7 +301,7 @@ GoogleStreamingRemoteEngine::ConnectBothStreams(const FSMEventArgs&) {
// Setup downstream fetcher.
std::vector<std::string> downstream_args;
downstream_args.push_back(
- "key=" + net::EscapeQueryParamValue(GetAPIKey(), true));
+ "key=" + net::EscapeQueryParamValue(google_apis::GetAPIKey(), true));
downstream_args.push_back("pair=" + request_key);
downstream_args.push_back("output=pb");
GURL downstream_url(std::string(kWebServiceBaseUrl) +
@@ -337,7 +321,7 @@ GoogleStreamingRemoteEngine::ConnectBothStreams(const FSMEventArgs&) {
// TODO(hans): Support for user-selected grammars.
std::vector<std::string> upstream_args;
upstream_args.push_back("key=" +
- net::EscapeQueryParamValue(GetAPIKey(), true));
+ net::EscapeQueryParamValue(google_apis::GetAPIKey(), true));
upstream_args.push_back("pair=" + request_key);
upstream_args.push_back("output=pb");
upstream_args.push_back(