Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1658)

Unified Diff: content/browser/speech/speech_recognition_manager_impl.cc

Issue 1889523002: Remove SpeechRecognitionSessionConfig::is_legacy_api (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/speech/speech_recognition_manager_impl.cc
diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc
index 47b5995f0256f359882df908509841fda8d0a945..511251278dbcca62105ce8a01f6c7ff48177415f 100644
--- a/content/browser/speech/speech_recognition_manager_impl.cc
+++ b/content/browser/speech/speech_recognition_manager_impl.cc
@@ -113,9 +113,6 @@ int SpeechRecognitionManagerImpl::CreateSession(
if (delegate_)
delegate_->GetDiagnosticInformation(&can_report_metrics, &hardware_info);
- // The legacy api cannot use continuous mode.
- DCHECK(!config.is_legacy_api || !config.continuous);
-
#if !defined(OS_ANDROID)
// A SpeechRecognitionEngine (and corresponding Config) is required only
// when using SpeechRecognizerImpl, which performs the audio capture and
@@ -141,15 +138,8 @@ int SpeechRecognitionManagerImpl::CreateSession(
remote_engine_config.auth_scope = config.auth_scope;
remote_engine_config.preamble = config.preamble;
- SpeechRecognitionEngine* google_remote_engine;
- if (config.is_legacy_api) {
- google_remote_engine =
- new GoogleOneShotRemoteEngine(config.url_request_context_getter.get());
Primiano Tucci (use gerrit) 2016/04/13 17:40:59 At this point in theory we could remove the Google
hans 2016/04/13 17:41:50 I have a CL for that :-) https://codereview.chromi
- } else {
- google_remote_engine = new GoogleStreamingRemoteEngine(
- config.url_request_context_getter.get());
- }
-
+ SpeechRecognitionEngine* google_remote_engine =
+ new GoogleStreamingRemoteEngine(config.url_request_context_getter.get());
google_remote_engine->SetConfig(remote_engine_config);
session->recognizer = new SpeechRecognizerImpl(

Powered by Google App Engine
This is Rietveld 408576698