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

Unified Diff: chrome/browser/intranet_redirect_detector.cc

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares 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: chrome/browser/intranet_redirect_detector.cc
===================================================================
--- chrome/browser/intranet_redirect_detector.cc (revision 106929)
+++ chrome/browser/intranet_redirect_detector.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "content/common/net/url_fetcher.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/registry_controlled_domain.h"
@@ -89,13 +90,7 @@
}
}
-void IntranetRedirectDetector::OnURLFetchComplete(
- const URLFetcher* source,
- const GURL& url,
- const net::URLRequestStatus& status,
- int response_code,
- const net::ResponseCookies& cookies,
- const std::string& data) {
+void IntranetRedirectDetector::OnURLFetchComplete(const URLFetcher* source) {
// Delete the fetcher on this function's exit.
Fetchers::iterator fetcher = fetchers_.find(const_cast<URLFetcher*>(source));
DCHECK(fetcher != fetchers_.end());
@@ -104,7 +99,7 @@
// If any two fetches result in the same domain/host, we set the redirect
// origin to that; otherwise we set it to nothing.
- if (!status.is_success() || (response_code != 200)) {
+ if (!source->status().is_success() || (source->response_code() != 200)) {
if ((resulting_origins_.empty()) ||
((resulting_origins_.size() == 1) &&
resulting_origins_.front().is_valid())) {
@@ -113,8 +108,8 @@
}
redirect_origin_ = GURL();
} else {
- DCHECK(url.is_valid());
- GURL origin(url.GetOrigin());
+ DCHECK(source->url().is_valid());
+ GURL origin(source->url().GetOrigin());
if (resulting_origins_.empty()) {
resulting_origins_.push_back(origin);
return;

Powered by Google App Engine
This is Rietveld 408576698