| Index: chrome/browser/shell_integration.cc
|
| ===================================================================
|
| --- chrome/browser/shell_integration.cc (revision 23187)
|
| +++ chrome/browser/shell_integration.cc (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -33,15 +33,9 @@
|
| return false;
|
| }
|
|
|
| - ShellUtil::RegisterStatus register_status =
|
| - ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, false);
|
| - if (register_status == ShellUtil::FAILURE) {
|
| - LOG(ERROR) << "Chrome could not be registered on the machine.";
|
| - return false;
|
| - }
|
| -
|
| // From UI currently we only allow setting default browser for current user.
|
| - if (!ShellUtil::MakeChromeDefault(ShellUtil::CURRENT_USER, chrome_exe)) {
|
| + if (!ShellUtil::MakeChromeDefault(ShellUtil::CURRENT_USER,
|
| + chrome_exe, true)) {
|
| LOG(ERROR) << "Chrome could not be set as default browser.";
|
| return false;
|
| }
|
| @@ -77,14 +71,22 @@
|
| if (!SUCCEEDED(hr))
|
| return false;
|
|
|
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution();
|
| + std::wstring app_name = dist->GetApplicationName();
|
| + std::wstring app_name_with_suffix;
|
| + ShellUtil::GetUserSpecificDefaultBrowserSuffix(&app_name_with_suffix);
|
| + app_name_with_suffix = app_name + app_name_with_suffix;
|
| for (int i = 0; i < _countof(kChromeProtocols); i++) {
|
| BOOL result = TRUE;
|
| - BrowserDistribution* dist = BrowserDistribution::GetDistribution();
|
| hr = pAAR->QueryAppIsDefault(kChromeProtocols[i].c_str(), AT_URLPROTOCOL,
|
| - AL_EFFECTIVE, dist->GetApplicationName().c_str(), &result);
|
| + AL_EFFECTIVE, app_name_with_suffix.c_str(), &result);
|
| if (!SUCCEEDED(hr) || (result == FALSE)) {
|
| - pAAR->Release();
|
| - return false;
|
| + hr = pAAR->QueryAppIsDefault(kChromeProtocols[i].c_str(),
|
| + AT_URLPROTOCOL, AL_EFFECTIVE, app_name.c_str(), &result);
|
| + if (!SUCCEEDED(hr) || (result == FALSE)) {
|
| + pAAR->Release();
|
| + return false;
|
| + }
|
| }
|
| }
|
| pAAR->Release();
|
|
|
| Property changes on: chrome\browser\shell_integration.cc
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
| Merged /branches/chrome_webkit_merge_branch/chrome/browser/shell_integration.cc:r69-2775
|
| Merged /trunk/src/chrome/browser/shell_integration.cc:r21428
|
|
|
|
|