From 4493574d71becba0ad1cbb74ce600466cc4f33e0 Mon Sep 17 00:00:00 2001 From: "mnissler@chromium.org" Date: Fri, 10 Sep 2010 08:18:46 +0000 Subject: 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 --- chrome_frame/test/chrome_frame_ui_test_utils.cc | 6 +++--- chrome_frame/utils.cc | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'chrome_frame') 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() { } } } - -- cgit v1.1