summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-16 16:57:33 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-16 23:58:34 +0000
commit955093110ad64d5ec6f5426991efaa4a680b5d6f (patch)
tree19368cdb8861595640715e1072789959729efc2d /extensions/common/extension.cc
parent387e05a79c7ae346ba7db36977ddfca7ca6f10a3 (diff)
downloadchromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.zip
chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.tar.gz
chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.tar.bz2
Remove legacy StartsWithASCII function.
This replaces it with base::StartsWith and the appropriate case flag. Since the existing version only ever did case-insensitive tests in ASCII, there should be no behavior change. BUG=506255 TBR=jam Review URL: https://codereview.chromium.org/1242023005 Cr-Commit-Position: refs/heads/master@{#339175}
Diffstat (limited to 'extensions/common/extension.cc')
-rw-r--r--extensions/common/extension.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index d42fce6..b680385 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -154,7 +154,8 @@ GURL Extension::GetResourceURL(const GURL& extension_url,
path = relative_path.substr(1);
GURL ret_val = GURL(extension_url.spec() + path);
- DCHECK(base::StartsWithASCII(ret_val.spec(), extension_url.spec(), false));
+ DCHECK(base::StartsWith(ret_val.spec(), extension_url.spec(),
+ base::CompareCase::INSENSITIVE_ASCII));
return ret_val;
}
@@ -205,7 +206,8 @@ bool Extension::ParsePEMKeyBytes(const std::string& input,
return false;
std::string working = input;
- if (base::StartsWithASCII(working, kKeyBeginHeaderMarker, true)) {
+ if (base::StartsWith(working, kKeyBeginHeaderMarker,
+ base::CompareCase::SENSITIVE)) {
working = base::CollapseWhitespaceASCII(working, true);
size_t header_pos = working.find(kKeyInfoEndMarker,
sizeof(kKeyBeginHeaderMarker) - 1);