| Index: chrome/browser/shell_integration_win.cc
|
| diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
|
| index 9a92a9c438eacc3dd186c19701c4a74d41639d37..46a4055c04823a570c00aac2222567ede886190c 100644
|
| --- a/chrome/browser/shell_integration_win.cc
|
| +++ b/chrome/browser/shell_integration_win.cc
|
| @@ -689,6 +689,28 @@ bool SetAsDefaultProtocolClientUsingIntentPicker(const std::string& protocol) {
|
| return true;
|
| }
|
|
|
| +void SetAsDefaultProtocolClientUsingSystemSettings(
|
| + const std::string& protocol,
|
| + const base::Closure& on_finished_callback) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::FILE);
|
| +
|
| + base::FilePath chrome_exe;
|
| + if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
|
| + NOTREACHED() << "Error getting app exe path";
|
| + on_finished_callback.Run();
|
| + return;
|
| + }
|
| +
|
| + // The helper manages its own lifetime.
|
| + base::string16 wprotocol(base::UTF8ToUTF16(protocol));
|
| + static const wchar_t* const kProtocols[] = {wprotocol.c_str(), nullptr};
|
| + OpenSystemSettingsHelper::Begin(kProtocols, on_finished_callback);
|
| +
|
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution();
|
| + ShellUtil::ShowMakeChromeDefaultProtocolClientSystemUI(dist, chrome_exe,
|
| + wprotocol);
|
| +}
|
| +
|
| } // namespace win
|
|
|
| } // namespace shell_integration
|
|
|