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

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

Issue 10539169: Prototype version of the first-run dialog for Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed non-windows compilation errors. Created 8 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
« chrome/chrome_browser.gypi ('K') | « chrome/common/url_constants.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 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,
« chrome/chrome_browser.gypi ('K') | « chrome/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698