summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension_urls.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-01 12:26:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-01 19:28:35 +0000
commit94a2cc2c77b73aaaceae5de709c6b453f8fe2c0e (patch)
tree9326be0be8d8cd7813115464194f0182670e8f3c /extensions/common/extension_urls.cc
parentd3cb15365f7cca8be2d794be25be88f6a72771a4 (diff)
downloadchromium_src-94a2cc2c77b73aaaceae5de709c6b453f8fe2c0e.zip
chromium_src-94a2cc2c77b73aaaceae5de709c6b453f8fe2c0e.tar.gz
chromium_src-94a2cc2c77b73aaaceae5de709c6b453f8fe2c0e.tar.bz2
Fix some case-insensitive cases for StartsWith.
This is not all callers so the old function is not deleted. Most calls are replaced with either StartsWith with the enum, or StartsWith(base::i18n::ToLower(...) for cases that need truely-internationalized case comparison (or when I wasn't sure). The most interesting case is chrome/installer/util which can't depend on base/i18n and it wants Unicode case-insensitive compares. I replaced these with a call to the Win32 function CompareString Add a missing protobuf dependency in components/storage_monitor that a try run turned up. In a few cases there is some related cleanup when I touched code: SplitString calls in experiment_labels.cc (which I've been doing patches to update), for loop in gcapi_omaha_experiment.cc, In some cases, a ToLower call was pulled out of a loop as in autofill_agent.cc. From this file I also removed a redundant comparison since the code checked it if was equal or a prefix, and a prefix returns true if it's equal. BUG=506255 Review URL: https://codereview.chromium.org/1220653002 Cr-Commit-Position: refs/heads/master@{#337093}
Diffstat (limited to 'extensions/common/extension_urls.cc')
-rw-r--r--extensions/common/extension_urls.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/common/extension_urls.cc b/extensions/common/extension_urls.cc
index 2b34178..c4215bc 100644
--- a/extensions/common/extension_urls.cc
+++ b/extensions/common/extension_urls.cc
@@ -21,7 +21,7 @@ const char kSchemaUtils[] = "schemaUtils";
bool IsSourceFromAnExtension(const base::string16& source) {
return GURL(source).SchemeIs(kExtensionScheme) ||
base::StartsWith(source, base::ASCIIToUTF16("extensions::"),
- true /* case-sensitive */);
+ base::CompareCase::SENSITIVE);
}
} // namespace extensions