Chromium Code Reviews| Index: chrome/browser/shell_integration_win.cc |
| diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc |
| index 08b988589ea6495f6b697c69de3544ed9be5ba21..23565123b7ec0488be012563a6cd85bf0c444c85 100644 |
| --- a/chrome/browser/shell_integration_win.cc |
| +++ b/chrome/browser/shell_integration_win.cc |
| @@ -461,6 +461,26 @@ bool ShellIntegration::SetAsDefaultBrowserInteractive() { |
| return true; |
| } |
| +bool ShellIntegration::SetAsDefaultProtocolClientInteractive( |
| + const std::string& protocol) { |
| + FilePath chrome_exe; |
| + if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { |
| + NOTREACHED() << "Error getting app exe path"; |
| + return false; |
| + } |
| + |
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| + string16 wprotocol = UTF8ToUTF16(protocol); |
|
grt (UTC plus 2)
2012/09/20 13:10:13
nit: string16 wprotocol(UTF8ToUTF16(protocol));
benwells
2012/09/21 01:15:20
Done.
|
| + if (!ShellUtil::ShowMakeChromeDefaultProtocolClientSystemUI( |
| + dist, chrome_exe.value(), wprotocol)) { |
|
grt (UTC plus 2)
2012/09/20 13:10:13
nit: indent four additional spaces.
benwells
2012/09/21 01:15:20
Done.
|
| + LOG(ERROR) << "Failed to launch the set-default Windows UI."; |
| + return false; |
| + } |
| + |
| + VLOG(1) << "Set-as-default Windows UI triggered."; |
|
grt (UTC plus 2)
2012/09/20 13:10:13
I think it's more informative for "triggered" to b
benwells
2012/09/21 01:15:20
Done.
|
| + return true; |
| +} |
| + |
| ShellIntegration::DefaultWebClientState ShellIntegration::IsDefaultBrowser() { |
| // When we check for default browser we don't necessarily want to count file |
| // type handlers and icons as having changed the default browser status, |