summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
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