diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 08:18:46 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 08:18:46 +0000 |
commit | 4493574d71becba0ad1cbb74ce600466cc4f33e0 (patch) | |
tree | f50e1a49a49043de9e134087cb98f3b337fdf3b1 /chrome_frame | |
parent | a15cbd47814d62163e2d66e64e7cb9e144fa5ca1 (diff) | |
download | chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.zip chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.tar.gz chromium_src-4493574d71becba0ad1cbb74ce600466cc4f33e0.tar.bz2 |
Make the glob matcher support UTF8 strings.
This generalizes the existing pattern matching code to support UTF8 strings.
BUG=53158
TEST=string_util_unittests.cc
Review URL: http://codereview.chromium.org/3295018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/chrome_frame_ui_test_utils.cc | 6 | ||||
-rw-r--r-- | chrome_frame/utils.cc | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/chrome_frame/test/chrome_frame_ui_test_utils.cc b/chrome_frame/test/chrome_frame_ui_test_utils.cc index 3ff61f7..b0ff727 100644 --- a/chrome_frame/test/chrome_frame_ui_test_utils.cc +++ b/chrome_frame/test/chrome_frame_ui_test_utils.cc @@ -489,15 +489,15 @@ bool AccObjectMatcher::DoesMatch(AccObject* object) const { std::wstring name, role_text, value; if (name_.length()) { object->GetName(&name); - does_match = MatchPatternWide(name, name_); + does_match = MatchPattern(name, name_); } if (does_match && role_text_.length()) { object->GetRoleText(&role_text); - does_match = MatchPatternWide(role_text, role_text_); + does_match = MatchPattern(role_text, role_text_); } if (does_match && value_.length()) { object->GetValue(&value); - does_match = MatchPatternWide(value, value_); + does_match = MatchPattern(value, value_); } return does_match; } diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 887d13d..8526b9a 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -719,7 +719,7 @@ bool IsOptInUrl(const wchar_t* url) { bool match_found = false; RegistryValueIterator url_list(config_key.Handle(), url_list_name); while (!match_found && url_list.Valid()) { - if (MatchPatternWide(url, url_list.Name())) { + if (MatchPattern(url, url_list.Name())) { match_found = true; } else { ++url_list; @@ -1437,4 +1437,3 @@ void PinModule() { } } } - |