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

Unified Diff: chrome/common/net/gaia/gaia_auth_fetcher.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
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_fetcher.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_auth_fetcher.cc
===================================================================
--- chrome/common/net/gaia/gaia_auth_fetcher.cc (revision 107061)
+++ chrome/common/net/gaia/gaia_auth_fetcher.cc (working copy)
@@ -125,7 +125,7 @@
}
// static
-URLFetcher* GaiaAuthFetcher::CreateGaiaFetcher(
+content::URLFetcher* GaiaAuthFetcher::CreateGaiaFetcher(
net::URLRequestContextGetter* getter,
const std::string& body,
const GURL& gaia_gurl,
@@ -137,8 +137,8 @@
gaia_gurl,
URLFetcher::POST,
delegate);
- to_return->set_request_context(getter);
- to_return->set_upload_data("application/x-www-form-urlencoded", body);
+ to_return->SetRequestContext(getter);
+ to_return->SetUploadData("application/x-www-form-urlencoded", body);
// The Gaia token exchange requests do not require any cookie-based
// identification as part of requests. We suppress sending any cookies to
@@ -146,7 +146,7 @@
// services. Where such mixing is desired (MergeSession), it will be done
// explicitly.
if (!send_cookies)
- to_return->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES);
+ to_return->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES);
return to_return;
}
@@ -580,11 +580,11 @@
}
}
-void GaiaAuthFetcher::OnURLFetchComplete(const URLFetcher* source) {
+void GaiaAuthFetcher::OnURLFetchComplete(const content::URLFetcher* source) {
fetch_pending_ = false;
- const GURL& url = source->url();
- const net::URLRequestStatus& status = source->status();
- int response_code = source->response_code();
+ const GURL& url = source->GetUrl();
+ const net::URLRequestStatus& status = source->GetStatus();
+ int response_code = source->GetResponseCode();
std::string data;
source->GetResponseAsString(&data);
if (url == client_login_gurl_) {
@@ -596,7 +596,7 @@
} else if (url == token_auth_gurl_) {
OnTokenAuthFetched(data, status, response_code);
} else if (url == merge_session_gurl_ ||
- (source && source->original_url() == merge_session_gurl_)) {
+ (source && source->GetOriginalUrl() == merge_session_gurl_)) {
// MergeSession may redirect, so check the original URL of the fetcher.
OnMergeSessionFetched(data, status, response_code);
} else {
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_fetcher.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698