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

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

Issue 15140003: Add support for split Public Suffix List distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again Created 7 years, 7 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/safe_browsing/ui_manager.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c6e6d633050953f55765d331c086712808de25f0 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::registry_controlled_domains::SameDomainOrHost(
+ url,
+ IntranetRedirectDetector::RedirectOrigin(),
+ net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
+ state_ = same_domain_or_host ? FAILED : SUCCEEDED;
+ } else {
+ state_ = FAILED;
+ }
}
}
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698