diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 23:46:21 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 23:46:21 +0000 |
commit | b31844be04ffac8e67d5f302c3bad5b28e1dec79 (patch) | |
tree | 87a8aec4af7897c5bc5b4c8edba29b604a5ef861 /chrome/browser/shell_integration_win.cc | |
parent | 4c58b9cfc4a33c252b81b991949891a709f62f99 (diff) | |
download | chromium_src-b31844be04ffac8e67d5f302c3bad5b28e1dec79.zip chromium_src-b31844be04ffac8e67d5f302c3bad5b28e1dec79.tar.gz chromium_src-b31844be04ffac8e67d5f302c3bad5b28e1dec79.tar.bz2 |
Do not delete default browser entries for other users when uninstalling it for one user.
BUG=19222
TEST=Install and set Chrome as default for two different users on the same machine. Uninstall for one user and make sure the default browser still works for the second user.
Review URL: http://codereview.chromium.org/164454
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_win.cc')
-rw-r--r-- | chrome/browser/shell_integration_win.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc index 6f1957a..040b03c 100644 --- a/chrome/browser/shell_integration_win.cc +++ b/chrome/browser/shell_integration_win.cc @@ -73,20 +73,20 @@ bool ShellIntegration::IsDefaultBrowser() { 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; + // If a user specific default browser entry exists, we check for that + // app name being default. If not, then default browser is just called + // Google Chrome or Chromium so we do not append suffix to app name. + std::wstring suffix; + if (ShellUtil::GetUserSpecificDefaultBrowserSuffix(&suffix)) + app_name += suffix; + for (int i = 0; i < _countof(kChromeProtocols); i++) { BOOL result = TRUE; hr = pAAR->QueryAppIsDefault(kChromeProtocols[i].c_str(), AT_URLPROTOCOL, - AL_EFFECTIVE, app_name_with_suffix.c_str(), &result); + AL_EFFECTIVE, app_name.c_str(), &result); if (!SUCCEEDED(hr) || (result == 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(); + return false; } } pAAR->Release(); |