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

Unified Diff: chrome/browser/ui/omnibox/alternate_nav_url_fetcher.cc

Issue 13979002: Add support for split PSL list distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed chrome_frame compilation issue Created 7 years, 8 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/ui/omnibox/alternate_nav_url_fetcher.cc
diff --git a/chrome/browser/ui/omnibox/alternate_nav_url_fetcher.cc b/chrome/browser/ui/omnibox/alternate_nav_url_fetcher.cc
index cccb07d11b56237fb436794f96575b3aa7d93912..7a9e1f69ee9d4e4a4d44e1ad25c45620bfdb9009 100644
--- a/chrome/browser/ui/omnibox/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/ui/omnibox/alternate_nav_url_fetcher.cc
@@ -133,10 +133,17 @@ void AlternateNavURLFetcher::SetStatusFromURLFetch(
// target address exists as long as we're not redirected to a common
// location every time, lest we annoy the user with infobars on everything
// they type. See comments on IntranetRedirectDetector.
- state_ = ((status.status() == net::URLRequestStatus::CANCELED) &&
- ((response_code / 100) == 3) &&
- !net::RegistryControlledDomainService::SameDomainOrHost(url,
- IntranetRedirectDetector::RedirectOrigin())) ? SUCCEEDED : FAILED;
+ if (status.status() == net::URLRequestStatus::CANCELED &&
+ (response_code / 100) == 3) {
+ const bool same_domain_or_host =
+ net::RegistryControlledDomainService::SameDomainOrHost(
+ url,
+ IntranetRedirectDetector::RedirectOrigin(),
+ net::RCDS::EXCLUDE_PRIVATE_REGISTRIES);
+ state_ = same_domain_or_host ? FAILED : SUCCEEDED;
+ } else {
+ state_ = FAILED;
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698