diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 07:28:46 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 07:28:46 +0000 |
commit | e06f4d5c6bd7bad162c45784e39cd0114635eb42 (patch) | |
tree | e53d6b4188af6e49393babc92a797ed5734a1026 /chrome/browser/ui | |
parent | 2b107a348f2b27934fe38680ec8010d743f61765 (diff) | |
download | chromium_src-e06f4d5c6bd7bad162c45784e39cd0114635eb42.zip chromium_src-e06f4d5c6bd7bad162c45784e39cd0114635eb42.tar.gz chromium_src-e06f4d5c6bd7bad162c45784e39cd0114635eb42.tar.bz2 |
Regkey functions return error code instead of bool
Change the Regkey helper to consistently use and return LONG
instead of bool. Fix RegKey usage all over the code base and
get rid of workarounds due to lack of return value.
Reviewers:
brettw: everything (skip parts for other reviewers if you wish)
robertshield,grt: chrome_frame, installer
siggi: ceee
BUG=none
TEST=covered by existing tests
Review URL: http://codereview.chromium.org/6090006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/views/external_protocol_dialog.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/shell_dialogs_win.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc index 30aa4d8..61f0d38 100644 --- a/chrome/browser/ui/views/external_protocol_dialog.cc +++ b/chrome/browser/ui/views/external_protocol_dialog.cc @@ -176,7 +176,7 @@ std::wstring ExternalProtocolDialog::GetApplicationForProtocol( std::wstring parameters = url_spec.substr(split_offset + 1, url_spec.length() - 1); std::wstring application_to_launch; - if (cmd_key.ReadValue(NULL, &application_to_launch)) { + if (cmd_key.ReadValue(NULL, &application_to_launch) == ERROR_SUCCESS) { ReplaceSubstringsAfterOffset(&application_to_launch, 0, L"%1", parameters); return application_to_launch; } else { diff --git a/chrome/browser/ui/views/shell_dialogs_win.cc b/chrome/browser/ui/views/shell_dialogs_win.cc index f1c59b4..710aac2 100644 --- a/chrome/browser/ui/views/shell_dialogs_win.cc +++ b/chrome/browser/ui/views/shell_dialogs_win.cc @@ -75,9 +75,9 @@ static bool GetRegistryDescriptionFromExtension(const std::wstring& file_ext, DCHECK(reg_description); base::win::RegKey reg_ext(HKEY_CLASSES_ROOT, file_ext.c_str(), KEY_READ); std::wstring reg_app; - if (reg_ext.ReadValue(NULL, ®_app) && !reg_app.empty()) { + if (reg_ext.ReadValue(NULL, ®_app) == ERROR_SUCCESS && !reg_app.empty()) { base::win::RegKey reg_link(HKEY_CLASSES_ROOT, reg_app.c_str(), KEY_READ); - if (reg_link.ReadValue(NULL, reg_description)) + if (reg_link.ReadValue(NULL, reg_description) == ERROR_SUCCESS) return true; } return false; |