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

Unified Diff: content/browser/speech/google_one_shot_remote_engine.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/google_one_shot_remote_engine.cc
diff --git a/content/browser/speech/google_one_shot_remote_engine.cc b/content/browser/speech/google_one_shot_remote_engine.cc
index 113a939692ce351bbc04c9fcf99128a95fdd428e..00a83e45ae7863a6db2461588c9b3b90fe2e5432 100644
--- a/content/browser/speech/google_one_shot_remote_engine.cc
+++ b/content/browser/speech/google_one_shot_remote_engine.cc
@@ -164,7 +164,7 @@ void GoogleOneShotRemoteEngine::StartRecognition() {
DCHECK(!url_fetcher_.get());
std::string lang_param = config_.language;
- if (lang_param.empty() && url_context_) {
+ if (lang_param.empty() && url_context_.get()) {
// If no language is provided then we use the first from the accepted
// language list. If this list is empty then it defaults to "en-US".
// Example of the contents of this list: "es,en-GB;q=0.8", ""
@@ -211,7 +211,7 @@ void GoogleOneShotRemoteEngine::StartRecognition() {
net::URLFetcher::POST,
this));
url_fetcher_->SetChunkedUpload(encoder_->mime_type());
- url_fetcher_->SetRequestContext(url_context_);
+ url_fetcher_->SetRequestContext(url_context_.get());
url_fetcher_->SetReferrer(config_.origin_url);
// The speech recognition API does not require user identification as part
@@ -249,7 +249,7 @@ void GoogleOneShotRemoteEngine::AudioChunksEnded() {
new AudioChunk(reinterpret_cast<uint8*>(&samples[0]),
samples.size() * sizeof(int16),
encoder_->bits_per_sample() / 8));
- encoder_->Encode(*dummy_chunk);
+ encoder_->Encode(*dummy_chunk.get());
encoder_->Flush();
scoped_refptr<AudioChunk> encoded_dummy_data(
encoder_->GetEncodedDataAndClear());

Powered by Google App Engine
This is Rietveld 408576698