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

Side by Side Diff: content/browser/speech/speech_recognition_manager_impl.cc

Issue 137853010: Speech recognition: Fixing erroneous DCHECK usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed review comments Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/speech/speech_recognizer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/speech/speech_recognition_manager_impl.h" 5 #include "content/browser/speech/speech_recognition_manager_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/browser_main_loop.h" 8 #include "content/browser/browser_main_loop.h"
9 #include "content/browser/renderer_host/media/media_stream_manager.h" 9 #include "content/browser/renderer_host/media/media_stream_manager.h"
10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" 10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } else { 140 } else {
141 google_remote_engine = new GoogleStreamingRemoteEngine( 141 google_remote_engine = new GoogleStreamingRemoteEngine(
142 config.url_request_context_getter.get()); 142 config.url_request_context_getter.get());
143 } 143 }
144 144
145 google_remote_engine->SetConfig(remote_engine_config); 145 google_remote_engine->SetConfig(remote_engine_config);
146 146
147 session->recognizer = new SpeechRecognizerImpl( 147 session->recognizer = new SpeechRecognizerImpl(
148 this, 148 this,
149 session_id, 149 session_id,
150 !config.continuous, 150 config.continuous,
151 config.interim_results,
151 google_remote_engine); 152 google_remote_engine);
152 #else 153 #else
153 session->recognizer = new SpeechRecognizerImplAndroid(this, session_id); 154 session->recognizer = new SpeechRecognizerImplAndroid(this, session_id);
154 #endif 155 #endif
155 return session_id; 156 return session_id;
156 } 157 }
157 158
158 void SpeechRecognitionManagerImpl::StartSession(int session_id) { 159 void SpeechRecognitionManagerImpl::StartSession(int session_id) {
159 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 160 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
160 if (!SessionExists(session_id)) 161 if (!SessionExists(session_id))
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 SpeechRecognitionManagerImpl::Session::Session() 688 SpeechRecognitionManagerImpl::Session::Session()
688 : id(kSessionIDInvalid), 689 : id(kSessionIDInvalid),
689 abort_requested(false), 690 abort_requested(false),
690 listener_is_active(true) { 691 listener_is_active(true) {
691 } 692 }
692 693
693 SpeechRecognitionManagerImpl::Session::~Session() { 694 SpeechRecognitionManagerImpl::Session::~Session() {
694 } 695 }
695 696
696 } // namespace content 697 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/speech/speech_recognizer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698