Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10087)

Unified Diff: chrome/installer/util/shell_util.cc

Issue 149136: Make default browser path check case insensitive. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/shell_integration.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.cc
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 55e576aa3a694f870b0deb4166d28a81b8bc8113..98c137f7431acd184b9db038ddd11eb1832dca6a 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) &&
« no previous file with comments | « chrome/browser/shell_integration.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698