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

Unified Diff: chrome/browser/net/gaia/gaia_oauth_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/browser/net/gaia/gaia_oauth_fetcher.h ('k') | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/gaia/gaia_oauth_fetcher.cc
===================================================================
--- chrome/browser/net/gaia/gaia_oauth_fetcher.cc (revision 107061)
+++ chrome/browser/net/gaia/gaia_oauth_fetcher.cc (working copy)
@@ -57,7 +57,7 @@
}
// static
-URLFetcher* GaiaOAuthFetcher::CreateGaiaFetcher(
+content::URLFetcher* GaiaOAuthFetcher::CreateGaiaFetcher(
net::URLRequestContextGetter* getter,
const GURL& gaia_gurl,
const std::string& body,
@@ -70,7 +70,7 @@
gaia_gurl,
empty_body ? URLFetcher::GET : URLFetcher::POST,
delegate);
- result->set_request_context(getter);
+ result->SetRequestContext(getter);
// The Gaia/OAuth token exchange requests do not require any cookie-based
// identification as part of requests. We suppress sending any cookies to
@@ -78,12 +78,12 @@
// services. Where such mixing is desired (prelogin, autologin
// or chromeos login), it will be done explicitly.
if (!send_cookies)
- result->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES);
+ result->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES);
if (!empty_body)
- result->set_upload_data("application/x-www-form-urlencoded", body);
+ result->SetUploadData("application/x-www-form-urlencoded", body);
if (!headers.empty())
- result->set_extra_request_headers(headers);
+ result->SetExtraRequestHeaders(headers);
return result;
}
@@ -655,18 +655,18 @@
}
}
-void GaiaOAuthFetcher::OnURLFetchComplete(const URLFetcher* source) {
+void GaiaOAuthFetcher::OnURLFetchComplete(const content::URLFetcher* source) {
// Keep |fetcher_| around to avoid invalidating its |status| (accessed below).
- scoped_ptr<URLFetcher> current_fetcher(fetcher_.release());
+ scoped_ptr<content::URLFetcher> current_fetcher(fetcher_.release());
fetch_pending_ = false;
GaiaUrls* gaia_urls = GaiaUrls::GetInstance();
- GURL url = source->url();
+ GURL url = source->GetUrl();
std::string data;
source->GetResponseAsString(&data);
- net::URLRequestStatus status = source->status();
- int response_code = source->response_code();
+ net::URLRequestStatus status = source->GetStatus();
+ int response_code = source->GetResponseCode();
if (StartsWithASCII(url.spec(), gaia_urls->get_oauth_token_url(), true)) {
- OnGetOAuthTokenUrlFetched(source->cookies(), status, response_code);
+ OnGetOAuthTokenUrlFetched(source->GetCookies(), status, response_code);
} else if (url.spec() == gaia_urls->oauth1_login_url()) {
OnOAuthLoginFetched(data, status, response_code);
} else if (url.spec() == gaia_urls->oauth_get_access_token_url()) {
« no previous file with comments | « chrome/browser/net/gaia/gaia_oauth_fetcher.h ('k') | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698