summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/shell_integration.cc6
-rw-r--r--chrome/installer/util/shell_util.cc6
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) &&