diff options
author | brettw <brettw@chromium.org> | 2015-07-13 19:24:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-14 02:25:27 +0000 |
commit | a2027fb609835a3f95557b39611e3d11b89fca03 (patch) | |
tree | 588e2007b546480bd3db40ab21be838386315f15 /win8 | |
parent | 5b3151cd707dee82b947ae096b12967e3c4a7c26 (diff) | |
download | chromium_src-a2027fb609835a3f95557b39611e3d11b89fca03.zip chromium_src-a2027fb609835a3f95557b39611e3d11b89fca03.tar.gz chromium_src-a2027fb609835a3f95557b39611e3d11b89fca03.tar.bz2 |
Remove CaseInsensitiveCompare from string_util.h
There were a number of callers in net using this for HTTP headers. I think
these callers actually just need ASCII case-insensitive comparisons so these
were changed.
The omnibox code used this functor. I added a new omnibox-specific one which
does not have the locale issues of the old string_util one, but which still
has the UTF-16 and combining accent issues (described in great detail in
the comment for this).
The Windows installer code can't depend on ICU so it calls the Win32 function
to do case-insensitive comparisons. This should match the system comparison
for registry keys better anyway.
I also changed a caller of StartsWith to use this version. I wrote this
StartsWith call using ToLower in a previous patch, but it turns out that the
lengths of case-mapped strings do change in practice, making the offset
computations of the suyrrounding code incorrect. This new version will be
like the old version (will miss some cases of case-insensitive equality) but
will handle 0x80-0xFF properly.
BUG=24917
Review URL: https://codereview.chromium.org/1230583014
Cr-Commit-Position: refs/heads/master@{#338624}
Diffstat (limited to 'win8')
-rw-r--r-- | win8/test/ui_automation_client.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win8/test/ui_automation_client.cc b/win8/test/ui_automation_client.cc index 9aa4237..22c1af1 100644 --- a/win8/test/ui_automation_client.cc +++ b/win8/test/ui_automation_client.cc @@ -323,10 +323,11 @@ void UIAutomationClient::Context::HandleWindowOpen( base::string16 class_name(V_BSTR(var.ptr())); - // Window class names are atoms, which are case-insensitive. + // Window class names are atoms, which are case-insensitive. Assume that + // the window in question only needs ASCII case-insensitivity. if (class_name.size() == class_name_.size() && std::equal(class_name.begin(), class_name.end(), class_name_.begin(), - base::CaseInsensitiveCompare<wchar_t>())) { + base::CaseInsensitiveCompareASCII<wchar_t>())) { RemoveWindowObserver(); ProcessWindow(window); } |