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

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

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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/speech_recognizer_impl.cc
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index c1789a767b0dcbdfdf880aecaa30f3b38b79f817..92164780621474e76dcf1816b01804493823bef7 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -151,9 +151,9 @@ SpeechRecognizerImpl::recognition_engine() const {
SpeechRecognizerImpl::~SpeechRecognizerImpl() {
endpointer_.EndSession();
- if (audio_controller_) {
- audio_controller_->Close(base::Bind(&KeepAudioControllerRefcountedForDtor,
- audio_controller_));
+ if (audio_controller_.get()) {
+ audio_controller_->Close(
+ base::Bind(&KeepAudioControllerRefcountedForDtor, audio_controller_));
}
}
@@ -225,7 +225,7 @@ void SpeechRecognizerImpl::DispatchEvent(const FSMEventArgs& event_args) {
if (event_args.event == EVENT_AUDIO_DATA) {
DCHECK(event_args.audio_data.get() != NULL);
- ProcessAudioPipeline(*event_args.audio_data);
+ ProcessAudioPipeline(*event_args.audio_data.get());
}
// The audio pipeline must be processed before the event dispatch, otherwise
@@ -439,7 +439,7 @@ SpeechRecognizerImpl::StartRecognitionEngine(const FSMEventArgs& event_args) {
// This is a little hack, since TakeAudioChunk() is already called by
// ProcessAudioPipeline(). It is the best tradeoff, unless we allow dropping
// the first audio chunk captured after opening the audio device.
- recognition_engine_->TakeAudioChunk(*(event_args.audio_data));
+ recognition_engine_->TakeAudioChunk(*(event_args.audio_data.get()));
return STATE_ESTIMATING_ENVIRONMENT;
}
« no previous file with comments | « content/browser/speech/speech_recognition_manager_impl.cc ('k') | content/browser/ssl/ssl_client_auth_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698