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

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

Issue 8375039: Create a content::UrlFetcher interface that lives in content/public/common and convert users to i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 9 years, 2 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_request.cc
===================================================================
--- content/browser/speech/speech_recognition_request.cc (revision 107061)
+++ content/browser/speech/speech_recognition_request.cc (working copy)
@@ -186,15 +186,15 @@
url,
URLFetcher::POST,
this));
- url_fetcher_->set_chunked_upload(content_type);
- url_fetcher_->set_request_context(url_context_);
- url_fetcher_->set_referrer(origin_url);
+ url_fetcher_->SetChunkedUpload(content_type);
+ url_fetcher_->SetRequestContext(url_context_);
+ url_fetcher_->SetReferrer(origin_url);
// The speech recognition API does not require user identification as part
// of requests, so we don't send cookies or auth data for these requests to
// prevent any accidental connection between users who are logged into the
// domain for other services (e.g. bookmark sync) with the speech requests.
- url_fetcher_->set_load_flags(
+ url_fetcher_->SetLoadFlags(
net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SEND_AUTH_DATA);
url_fetcher_->Start();
@@ -206,12 +206,13 @@
url_fetcher_->AppendChunkToUpload(audio_data, is_last_chunk);
}
-void SpeechRecognitionRequest::OnURLFetchComplete(const URLFetcher* source) {
+void SpeechRecognitionRequest::OnURLFetchComplete(
+ const content::URLFetcher* source) {
DCHECK_EQ(url_fetcher_.get(), source);
SpeechInputResult result;
std::string data;
- if (!source->status().is_success() || source->response_code() != 200 ||
+ if (!source->GetStatus().is_success() || source->GetResponseCode() != 200 ||
!source->GetResponseAsString(&data) ||
!ParseServerResponse(data, &result)) {
result.error = kErrorNetwork;
« no previous file with comments | « content/browser/speech/speech_recognition_request.h ('k') | content/browser/speech/speech_recognition_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698