From d565f6a80589670b0b81496de11d2a2e0d363a2f Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Fri, 9 Jul 2010 17:50:49 +0000 Subject: Remove unneccessary explicit blacklist. The heuristic should catch these. Keeping the list just makes it harder to find problems with the heuristic. BUG=none TEST=Still no infobars for single-word queries on any networks. Review URL: http://codereview.chromium.org/2917007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51979 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/alternate_nav_url_fetcher.cc | 34 ++++++++--------------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'chrome/browser/alternate_nav_url_fetcher.cc') diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc index fc21226..ebe136e 100644 --- a/chrome/browser/alternate_nav_url_fetcher.cc +++ b/chrome/browser/alternate_nav_url_fetcher.cc @@ -137,36 +137,20 @@ void AlternateNavURLFetcher::SetStatusFromURLFetch( // HTTP 2xx, 401, and 407 all indicate that the target address exists. (((response_code / 100) != 2) && (response_code != 401) && (response_code != 407)) || - // Fail if we're redirected to a common location. This is the "automatic - // heuristic" version of the explicit blacklist below; see comments there. + // Fail if we're redirected to a common location. + // This happens for ISPs/DNS providers/etc. who return + // provider-controlled pages to arbitrary user navigation attempts. + // Because this can result in infobars on large fractions of user + // searches, we don't show automatic infobars for these. Note that users + // can still choose to explicitly navigate to or search for pages in + // these domains, and can still get infobars for cases that wind up on + // other domains (e.g. legit intranet sites), we're just trying to avoid + // erroneously harassing the user with our own UI prompts. net::RegistryControlledDomainService::SameDomainOrHost(url, IntranetRedirectDetector::RedirectOrigin())) { state_ = FAILED; return; } - - // The following TLD+1s are used as destinations by ISPs/DNS providers/etc. - // who return provider-controlled pages to arbitrary user navigation attempts. - // Because this can result in infobars on large fractions of user searches, we - // don't show automatic infobars for these. Note that users can still choose - // to explicitly navigate to or search for pages in these domains, and can - // still get infobars for cases that wind up on other domains (e.g. legit - // intranet sites), we're just trying to avoid erroneously harassing the user - // with our own UI prompts. - const char* kBlacklistedSites[] = { - // NOTE: Use complete URLs, because GURL() doesn't do fixup! - "http://comcast.com/", - "http://opendns.com/", - "http://verizon.net/", - }; - for (size_t i = 0; i < arraysize(kBlacklistedSites); ++i) { - if (net::RegistryControlledDomainService::SameDomainOrHost(url, - GURL(kBlacklistedSites[i]))) { - state_ = FAILED; - return; - } - } - state_ = SUCCEEDED; } -- cgit v1.1