Index: chrome/installer/setup/install_worker.cc |
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc |
index 73b91ba617b570226bfa733b55d1d033ef6803ae..886a15cdb3607f56681f3ee19155d40d4acd1331 100644 |
--- a/chrome/installer/setup/install_worker.cc |
+++ b/chrome/installer/setup/install_worker.cc |
@@ -14,6 +14,7 @@ |
#include "base/command_line.h" |
#include "base/file_path.h" |
+#include "base/file_util.h" |
#include "base/logging.h" |
#include "base/path_service.h" |
#include "base/string_util.h" |
@@ -854,8 +855,8 @@ void AddInstallWorkItems(const InstallationState& original_state, |
AddVersionKeyWorkItems(root, product->distribution(), new_version, |
add_language_identifier, install_list); |
- AddDelegateExecuteWorkItems(original_state, installer_state, setup_path, |
- new_version, *product, install_list); |
+ AddDelegateExecuteWorkItems(installer_state, src_path, new_version, |
+ *product, install_list); |
} |
if (installer_state.is_multi_install()) { |
@@ -1061,9 +1062,8 @@ void AddChromeFrameWorkItems(const InstallationState& original_state, |
} |
} |
-void AddDelegateExecuteWorkItems(const InstallationState& original_state, |
- const InstallerState& installer_state, |
- const FilePath& setup_path, |
+void AddDelegateExecuteWorkItems(const InstallerState& installer_state, |
+ const FilePath& src_path, |
const Version& new_version, |
const Product& product, |
WorkItemList* list) { |
@@ -1092,7 +1092,13 @@ void AddDelegateExecuteWorkItems(const InstallationState& original_state, |
string16 interface_path(L"Software\\Classes\\Interface\\"); |
interface_path.append(interface_uuid); |
- if (is_install) { |
+ // Add work items to register the handler iff it is present. Remove its |
+ // registration otherwise since builds after r132190 included it when it |
+ // wasn't strictly necessary. |
+ // TODO(grt): remove the extra check for the .exe when it's ever-present. |
gab
2012/04/25 05:18:29
Actually, will all distributions have the .exe? If
grt (UTC plus 2)
2012/04/25 13:05:11
The check on line 1075 ensures that this is only h
gab
2012/04/25 13:44:02
Ah ok, perfect.
|
+ if (is_install && |
+ file_util::PathExists(src_path.AppendASCII(new_version.GetString()) |
+ .Append(kDelegateExecuteExe))) { |
// The path to the exe (in the version directory). |
FilePath delegate_execute( |
installer_state.target_path().AppendASCII(new_version.GetString())); |