Chromium Code Reviews| Index: chrome/installer/util/shell_util.cc |
| diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc |
| index 850f3c1991a7a4cc660283e085778bdbbe967043..977f7b01afaf7f009805dbcbfbfb6cb26e862291 100644 |
| --- a/chrome/installer/util/shell_util.cc |
| +++ b/chrome/installer/util/shell_util.cc |
| @@ -616,7 +616,7 @@ bool AnotherUserHasDefaultBrowser(BrowserDistribution* dist, |
| // handler for http (and, implicitly with it, https). In that case it is also |
| // known as the 'how do you want to open webpages' dialog. |
| // It is required that Chrome be already *registered* for the given protocol. |
| -bool LaunchSelectDefaultProtocolHandlerDialog(const wchar_t* protocol) { |
| +HRESULT LaunchSelectDefaultProtocolHandlerDialog(const wchar_t* protocol) { |
| DCHECK(protocol); |
| OPENASINFO open_as_info = {}; |
| open_as_info.pcszFile = protocol; |
| @@ -625,7 +625,7 @@ bool LaunchSelectDefaultProtocolHandlerDialog(const wchar_t* protocol) { |
| HRESULT hr = SHOpenWithDialog(NULL, &open_as_info); |
| DLOG_IF(WARNING, FAILED(hr)) << "Failed to set as default " << protocol |
| << " handler; hr=0x" << std::hex << hr; |
| - return SUCCEEDED(hr); |
| + return hr; |
| } |
| // Launches the Windows 7 and Windows 8 application association dialog, which |
| @@ -1057,7 +1057,8 @@ bool ShellUtil::ShowMakeChromeDefaultSystemUI(BrowserDistribution* dist, |
| // "Set Program Associations" section of the "Default Programs" |
| // control panel, which is a mess, or pop the concise "How you want to open |
| // webpages?" dialog. We choose the latter. |
| - return LaunchSelectDefaultProtocolHandlerDialog(L"http"); |
| + // Return true only when the user took an action and there was no error. |
| + return LaunchSelectDefaultProtocolHandlerDialog(L"http") == S_OK; |
|
grt (UTC plus 2)
2012/06/18 19:19:13
use SUCCEEDED() macro rather than comparing to S_O
motek.
2012/06/19 18:06:44
Yeah, obviously. I am not sure what made me believ
|
| } |
| bool ShellUtil::MakeChromeDefaultProtocolClient(BrowserDistribution* dist, |