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

Unified Diff: net/base/net_util_icu.cc

Issue 1220653002: Fix some case-insensitive cases for StartsWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: net/base/net_util_icu.cc
diff --git a/net/base/net_util_icu.cc b/net/base/net_util_icu.cc
index 0c2644b03976d4c17a1dc29011c18ff48289d3bb..0ece5eac227c5a965f2608d225ec8a56b6c7b4ba 100644
--- a/net/base/net_util_icu.cc
+++ b/net/base/net_util_icu.cc
@@ -794,7 +794,8 @@ base::string16 FormatUrlWithAdjustments(
// If we need to strip out http do it after the fact.
if (omit_http &&
- base::StartsWith(url_string, base::ASCIIToUTF16(kHTTP), true)) {
+ base::StartsWith(url_string, base::ASCIIToUTF16(kHTTP),
+ base::CompareCase::SENSITIVE)) {
const size_t kHTTPSize = arraysize(kHTTP) - 1;
url_string = url_string.substr(kHTTPSize);
// Because offsets in the |adjustments| are already calculated with respect

Powered by Google App Engine
This is Rietveld 408576698