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

Unified Diff: components/ssl_errors/error_classification.cc

Issue 2939423003: URL Formatter: Add StripSubdomain method that preserves eTLD + 1. (Closed)
Patch Set: Return std::string instead of base::StringPiece (which makes no sense) Created 3 years, 6 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: components/ssl_errors/error_classification.cc
diff --git a/components/ssl_errors/error_classification.cc b/components/ssl_errors/error_classification.cc
index da10872be4252f8cff83ccfb84b6323db53fb768..c8ba362778c634b65edaf134ab7d30c7051cc817 100644
--- a/components/ssl_errors/error_classification.cc
+++ b/components/ssl_errors/error_classification.cc
@@ -294,8 +294,8 @@ bool GetWWWSubDomainMatch(const GURL& request_url,
return true;
}
} else {
- if (url_formatter::StripWWW(base::ASCIIToUTF16(host_name)) ==
- base::ASCIIToUTF16(dns_name)) {
+ if (url_formatter::StripSubdomains(
+ request_url, url_formatter::kStripWWW) == dns_name) {
*www_match_host_name = dns_name;
return true;
}
« no previous file with comments | « chrome/browser/search_engines/template_url_service_sync_unittest.cc ('k') | components/url_formatter/url_formatter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698