Commit e8fd2963 authored by kuchhal@chromium.org's avatar kuchhal@chromium.org

Make default browser path check case insensitive.

BUG=15449

Review URL: http://codereview.chromium.org/149136

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19976 0039d316-1c4b-4281-b951-d872f2087c98
parent 0b7648c1
......@@ -110,7 +110,11 @@ bool ShellIntegration::IsDefaultBrowser() {
std::wstring short_path;
GetShortPathName(command_line.program().c_str(),
WriteInto(&short_path, MAX_PATH), MAX_PATH);
if (short_path != short_app_path)
if ((short_path.size() != short_app_path.size()) ||
(!std::equal(short_path.begin(),
short_path.end(),
short_app_path.begin(),
CaseInsensitiveCompare<wchar_t>())))
return false;
}
}
......
......@@ -153,8 +153,10 @@ class RegistryEntry {
bool found = false;
if (_is_string) {
std::wstring read_value;
found = key.ReadValue(_name.c_str(), &read_value) &&
read_value == _value;
found = (key.ReadValue(_name.c_str(), &read_value)) &&
(read_value.size() == _value.size()) &&
(std::equal(_value.begin(), _value.end(), read_value.begin(),
CaseInsensitiveCompare<wchar_t>()));
} else {
DWORD read_value;
found = key.ReadValueDW(_name.c_str(), &read_value) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment