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

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

Issue 10273006: Introduced SpeechRecognitionDispatcher(Host) classes, handling dispatch of IPC messages for continu… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed according to Hans review. Created 8 years, 7 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/input_tag_speech_dispatcher_host.cc
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.cc b/content/browser/speech/input_tag_speech_dispatcher_host.cc
index cf6459713ee0129cbeea55fa0d3e1c171482a09a..1251eea57a147c4634f7a97d81d45cf8726126b7 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.cc
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.cc
@@ -89,7 +89,7 @@ bool InputTagSpeechDispatcherHost::OnMessageReceived(
}
void InputTagSpeechDispatcherHost::OnStartRecognition(
- const InputTagSpeechHostMsg_StartRecognition_Params &params) {
+ const InputTagSpeechHostMsg_StartRecognition_Params& params) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
SpeechRecognitionSessionContext context;
@@ -110,10 +110,8 @@ void InputTagSpeechDispatcherHost::OnStartRecognition(
config.filter_profanities = recognition_preferences_->FilterProfanities();
int session_id = manager()->CreateSession(config, this);
- if (session_id == content::SpeechRecognitionManager::kSessionIDInvalid)
- return;
-
- manager()->StartSession(session_id);
+ DCHECK_NE(session_id, content::SpeechRecognitionManager::kSessionIDInvalid);
+ manager()->StartSession(session_id);
}
void InputTagSpeechDispatcherHost::OnCancelRecognition(int render_view_id,

Powered by Google App Engine
This is Rietveld 408576698