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

Unified Diff: chrome/browser/android/preferences/website_preference_bridge.cc

Issue 1214183008: Update StartsWith calls to use new versions in chrome and content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/about_flags.cc ('k') | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/preferences/website_preference_bridge.cc
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index b426036b53e2e60f1247fc54f2bace3771b57ce6..ef40bafa40637957427cabf20d276e3e9933baac 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -75,12 +75,16 @@ static void GetOrigins(JNIEnv* env,
const char* kHttpPortSuffix = ":80";
const char* kHttpsPortSuffix = ":443";
ScopedJavaLocalRef<jstring> jorigin;
- if (base::StartsWithASCII(origin, url::kHttpsScheme, false) &&
- base::EndsWith(origin, kHttpsPortSuffix, false)) {
+ if (base::StartsWith(origin, url::kHttpsScheme,
+ base::CompareCase::INSENSITIVE_ASCII) &&
+ base::EndsWith(origin, kHttpsPortSuffix,
+ base::CompareCase::INSENSITIVE_ASCII)) {
jorigin = ConvertUTF8ToJavaString(
env, origin.substr(0, origin.size() - strlen(kHttpsPortSuffix)));
- } else if (base::StartsWithASCII(origin, url::kHttpScheme, false) &&
- base::EndsWith(origin, kHttpPortSuffix, false)) {
+ } else if (base::StartsWith(origin, url::kHttpScheme,
+ base::CompareCase::INSENSITIVE_ASCII) &&
+ base::EndsWith(origin, kHttpPortSuffix,
+ base::CompareCase::INSENSITIVE_ASCII)) {
jorigin = ConvertUTF8ToJavaString(
env, origin.substr(0, origin.size() - strlen(kHttpPortSuffix)));
} else {
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698