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

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

Issue 12035043: Implementing app command to query EULA acceptance state for Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style and string fixes. Created 7 years, 11 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
« no previous file with comments | « chrome/installer/setup/install_worker.h ('k') | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 7d774e2352dd0750509d1a3928d4192eb7e0b49c..6fa9674a79dbe0f2ff17a1f0d5fc2cf9fcd06d1d 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -212,7 +212,6 @@ void AddInstallerCopyTasks(const InstallerState& installer_state,
void AddInstallAppCommandWorkItems(const InstallerState& installer_state,
const InstallationState& machine_state,
- const FilePath& setup_path,
const Version& new_version,
const Product& product,
WorkItemList* work_item_list) {
@@ -253,12 +252,16 @@ void AddProductSpecificWorkItems(const InstallationState& original_state,
}
if (p.is_chrome_app_host()) {
AddInstallAppCommandWorkItems(installer_state, original_state,
- setup_path, new_version, p, list);
+ new_version, p, list);
}
if (p.is_chrome()) {
AddOsUpgradeWorkItems(installer_state, setup_path, new_version, p,
list);
}
+ if (p.is_chrome_binaries()) {
+ AddQueryEULAAcceptanceWorkItems(installer_state, setup_path, new_version,
+ p, list);
+ }
}
}
@@ -1637,4 +1640,33 @@ void AddOsUpgradeWorkItems(const InstallerState& installer_state,
}
}
+void AddQueryEULAAcceptanceWorkItems(const InstallerState& installer_state,
+ const FilePath& setup_path,
+ const Version& new_version,
+ const Product& product,
+ WorkItemList* work_item_list) {
+ const HKEY root_key = installer_state.root_key();
+ string16 cmd_key(product.distribution()->GetVersionKey());
+ cmd_key.append(1, FilePath::kSeparators[0])
+ .append(google_update::kRegCommandsKey)
+ .append(1, FilePath::kSeparators[0])
+ .append(kCmdQueryEULAAcceptance);
+ if (installer_state.operation() == InstallerState::UNINSTALL) {
+ work_item_list->AddDeleteRegKeyWorkItem(root_key, cmd_key)->
+ set_log_message("Removing query EULA acceptance command");
+ } else {
+ CommandLine cmd_line(installer_state
+ .GetInstallerDirectory(new_version)
+ .Append(setup_path.BaseName()));
+ cmd_line.AppendSwitch(switches::kQueryEULAAcceptance);
+ if (installer_state.system_install())
+ cmd_line.AppendSwitch(installer::switches::kSystemLevel);
+ if (installer_state.verbose_logging())
+ cmd_line.AppendSwitch(installer::switches::kVerboseLogging);
+ AppCommand cmd(cmd_line.GetCommandLineString());
+ cmd.set_is_web_accessible(true);
+ cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list);
+ }
+}
+
} // namespace installer
« no previous file with comments | « chrome/installer/setup/install_worker.h ('k') | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698