summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 03:15:11 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 03:15:11 +0000
commite612ea2be73e30ec03e8cd0b0e4b5df9c2be8cca (patch)
tree115a18c3eb90a926f82ba6c86a5aa67f1f83bde6 /chrome/installer
parentcc1d78ad844a2f5fa89aac6d27cb10a0b974113c (diff)
downloadchromium_src-e612ea2be73e30ec03e8cd0b0e4b5df9c2be8cca.zip
chromium_src-e612ea2be73e30ec03e8cd0b0e4b5df9c2be8cca.tar.gz
chromium_src-e612ea2be73e30ec03e8cd0b0e4b5df9c2be8cca.tar.bz2
Keep going with Vista default browser registration if there is a failure.
Keep going if there is a failure as rolling back is complicated and relies on undocumented Windows behaviour. Log any problems and return false from registration function. BUG=90372 TEST=Manual testing performed Review URL: http://codereview.chromium.org/7491039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/shell_util.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 93aee71..c077b1d 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -720,24 +720,27 @@ bool ShellUtil::MakeChromeDefault(BrowserDistribution* dist,
if (ShellUtil::GetUserSpecificDefaultBrowserSuffix(dist, &suffix))
app_name += suffix;
- for (int i = 0;
- SUCCEEDED(hr) && ShellUtil::kBrowserProtocolAssociations[i] != NULL;
- i++) {
+ for (int i = 0; ShellUtil::kBrowserProtocolAssociations[i] != NULL; i++) {
hr = pAAR->SetAppAsDefault(app_name.c_str(),
ShellUtil::kBrowserProtocolAssociations[i], AT_URLPROTOCOL);
+ if (!SUCCEEDED(hr)) {
+ ret = false;
+ LOG(ERROR) << "Failed to register as default for protocol "
+ << ShellUtil::kBrowserProtocolAssociations[i]
+ << " (" << hr << ")";
+ }
}
- for (int i = 0;
- SUCCEEDED(hr) && ShellUtil::kFileAssociations[i] != NULL; i++) {
+ for (int i = 0; ShellUtil::kFileAssociations[i] != NULL; i++) {
hr = pAAR->SetAppAsDefault(app_name.c_str(),
ShellUtil::kFileAssociations[i], AT_FILEEXTENSION);
+ if (!SUCCEEDED(hr)) {
+ ret = false;
+ LOG(ERROR) << "Failed to register as default for file extension "
+ << ShellUtil::kFileAssociations[i] << " (" << hr << ")";
+ }
}
}
- if (!SUCCEEDED(hr)) {
- ret = false;
- LOG(ERROR) << "Could not make Chrome default browser (Vista): HRESULT="
- << hr << ".";
- }
}
// Now use the old way to associate Chrome with supported protocols and file