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

Unified Diff: chrome/browser/intranet_redirect_detector.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/intranet_redirect_detector.h ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/intranet_redirect_detector.cc
===================================================================
--- chrome/browser/intranet_redirect_detector.cc (revision 107061)
+++ chrome/browser/intranet_redirect_detector.cc (working copy)
@@ -82,24 +82,26 @@
GURL random_url(url_string + '/');
URLFetcher* fetcher = new URLFetcher(random_url, URLFetcher::HEAD, this);
// We don't want these fetches to affect existing state in the profile.
- fetcher->set_load_flags(net::LOAD_DISABLE_CACHE |
- net::LOAD_DO_NOT_SAVE_COOKIES);
- fetcher->set_request_context(g_browser_process->system_request_context());
+ fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE |
+ net::LOAD_DO_NOT_SAVE_COOKIES);
+ fetcher->SetRequestContext(g_browser_process->system_request_context());
fetcher->Start();
fetchers_.insert(fetcher);
}
}
-void IntranetRedirectDetector::OnURLFetchComplete(const URLFetcher* source) {
+void IntranetRedirectDetector::OnURLFetchComplete(
+ const content::URLFetcher* source) {
// Delete the fetcher on this function's exit.
- Fetchers::iterator fetcher = fetchers_.find(const_cast<URLFetcher*>(source));
+ Fetchers::iterator fetcher = fetchers_.find(
+ const_cast<content::URLFetcher*>(source));
DCHECK(fetcher != fetchers_.end());
- scoped_ptr<URLFetcher> clean_up_fetcher(*fetcher);
+ scoped_ptr<content::URLFetcher> clean_up_fetcher(*fetcher);
fetchers_.erase(fetcher);
// If any two fetches result in the same domain/host, we set the redirect
// origin to that; otherwise we set it to nothing.
- if (!source->status().is_success() || (source->response_code() != 200)) {
+ if (!source->GetStatus().is_success() || (source->GetResponseCode() != 200)) {
if ((resulting_origins_.empty()) ||
((resulting_origins_.size() == 1) &&
resulting_origins_.front().is_valid())) {
@@ -108,8 +110,8 @@
}
redirect_origin_ = GURL();
} else {
- DCHECK(source->url().is_valid());
- GURL origin(source->url().GetOrigin());
+ DCHECK(source->GetUrl().is_valid());
+ GURL origin(source->GetUrl().GetOrigin());
if (resulting_origins_.empty()) {
resulting_origins_.push_back(origin);
return;
« no previous file with comments | « chrome/browser/intranet_redirect_detector.h ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698