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

Unified Diff: net/base/net_util.cc

Issue 1220653002: Fix some case-insensitive cases for StartsWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grt's review comments, Mac fix Created 5 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
« no previous file with comments | « extensions/common/extension_urls.cc ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index c59b3cd7ff4e91e1468ae5ca13a3c8110cc07882..73fa5f287d2e909a262445e55da134126d5ac353 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -279,7 +279,8 @@ bool IsCanonicalizedHostCompliant(const std::string& host) {
base::string16 StripWWW(const base::string16& text) {
const base::string16 www(base::ASCIIToUTF16("www."));
- return base::StartsWith(text, www, true) ? text.substr(www.length()) : text;
+ return base::StartsWith(text, www, base::CompareCase::SENSITIVE)
+ ? text.substr(www.length()) : text;
}
base::string16 StripWWWFromHost(const GURL& url) {
« no previous file with comments | « extensions/common/extension_urls.cc ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698