Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: chrome/installer/setup/install_worker.cc

Issue 10213010: Don't register or use the DelegateExecute verb handler if it isn't present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added code to not set the handler on shell verb registration Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()));

Powered by Google App Engine
This is Rietveld 408576698