Index: content/browser/speech/google_streaming_remote_engine.cc |
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc |
index 89bfdcd13b98fbc134ff90a8fba6f739036bb3e4..88a461a41c71cada6bdba693d9c199d82bf6fb1d 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( |