diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-06 20:17:28 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-06 20:17:28 +0000 |
commit | e8fd29634b3ecedb2fcfa2a6f759f7f7236f367a (patch) | |
tree | 7658a03424f348755274f494b6ce0f9aab10a686 /chrome | |
parent | 0b7648c108ec00ae0c4023e42a35496bd0e9ccf9 (diff) | |
download | chromium_src-e8fd29634b3ecedb2fcfa2a6f759f7f7236f367a.zip chromium_src-e8fd29634b3ecedb2fcfa2a6f759f7f7236f367a.tar.gz chromium_src-e8fd29634b3ecedb2fcfa2a6f759f7f7236f367a.tar.bz2 |
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
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/shell_integration.cc | 6 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index 0c45d56..ebcadbd 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -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; } } diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index 55e576a..98c137f 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -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) && |