diff options
author | brettw <brettw@chromium.org> | 2015-07-10 11:28:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-10 18:29:16 +0000 |
commit | 8a800901b78a29e33bc91b48621cec72964a1f14 (patch) | |
tree | 52d0f9991900203fc5867bdb3a5a755de6b80bc4 /content/plugin | |
parent | e6b7b46750d4a54a4005882a19d48334e5a9f628 (diff) | |
download | chromium_src-8a800901b78a29e33bc91b48621cec72964a1f14.zip chromium_src-8a800901b78a29e33bc91b48621cec72964a1f14.tar.gz chromium_src-8a800901b78a29e33bc91b48621cec72964a1f14.tar.bz2 |
Replace base::str[n]casecmp with helper functions.
Adds CompareCaseInsensitiveASCII and EqualsCaseInsensitiveASCII helper functions and removes base::strcasecmp and base::strncasecmp. This avoids the dangerous locale-sensitive behavior.
ClientIsAdvertisingSdchEncoding in sdch_browsertest had the condition inverted, but because it returned true any time the given line wasn't found, the test didn't notice.
cups_helper changed most significantly. I redid the loop to use StringPieces which saves a lot of copies. On line 82 cups_helper used to do a prefix match which I'm pretty sure it wanted a regular compare. I changed this.
render_text_harfbuzz set "<" operator was also doing a prefix comparison only, when it looks like it really just wanted to compare the strings.
file_path passed string pieces into strcasecmp which could then read off the end if they're not null terminated. This patch fixes the bug and calls the native strcasecmp which is probably the best we can do for Posix file names.
Removed additional version of the same function in net.
Adds a backwards-compat hack for crashpad which improperly uses base from a DEPS-ed in repo.
Review URL: https://codereview.chromium.org/1224553010
Cr-Commit-Position: refs/heads/master@{#338324}
Diffstat (limited to 'content/plugin')
-rw-r--r-- | content/plugin/webplugin_proxy.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc index 3c60714..6b6d696 100644 --- a/content/plugin/webplugin_proxy.cc +++ b/content/plugin/webplugin_proxy.cc @@ -280,7 +280,7 @@ void WebPluginProxy::HandleURLRequest(const char* url, int notify_id, bool popups_allowed, bool notify_redirects) { - if (!target && (0 == base::strcasecmp(method, "GET"))) { + if (!target && base::EqualsCaseInsensitiveASCII(method, "GET")) { // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 // for more details on this. if (delegate_->GetQuirks() & |