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

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: Code complete: added app command install and app_host.exe wait/forward. 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
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..c2f4af1599bdcfb5b541a1ac8bf1e2ccbe65a7d6 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,
huangs 2013/01/23 04:37:56 (Unrelated) code cleanup: unused parameter.
const Version& new_version,
const Product& product,
WorkItemList* work_item_list) {
@@ -253,7 +252,8 @@ void AddProductSpecificWorkItems(const InstallationState& original_state,
}
if (p.is_chrome_app_host()) {
AddInstallAppCommandWorkItems(installer_state, original_state,
- setup_path, new_version, p, list);
huangs 2013/01/23 04:37:56 (Unrelated) code cleanup: unused parameter.
+ new_version, p, list);
+ AddQueryEULAAcceptanceWorkItems(installer_state, p, list);
}
if (p.is_chrome()) {
AddOsUpgradeWorkItems(installer_state, setup_path, new_version, p,
@@ -1637,4 +1637,27 @@ void AddOsUpgradeWorkItems(const InstallerState& installer_state,
}
}
+void AddQueryEULAAcceptanceWorkItems(const InstallerState& installer_state,
+ const Product& product,
+ WorkItemList* work_item_list) {
+ const HKEY root_key = installer_state.root_key();
+ string16 cmd_key(product.distribution()->GetVersionKey());
grt (UTC plus 2) 2013/01/23 19:02:29 this is adding the command to the app host. somet
huangs 2013/01/24 00:08:08 It's invoking whatever Chrome that's available.
+ 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.target_path().Append(installer::kChromeAppHostExe));
grt (UTC plus 2) 2013/01/23 19:02:29 kChromeAppHostExe -> kChromeExe?
huangs 2013/01/24 00:08:08 Done.
+ cmd_line.AppendSwitch(::switches::kQueryEULAAcceptance);
+ AppCommand cmd(cmd_line.GetCommandLineString());
+ // cmd.set_sends_pings(true); // QUESTION(huangs): Do we need this?????
huangs 2013/01/23 04:37:56 Please note question.
+ cmd.set_is_web_accessible(true);
+ cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list);
+ }
+}
+
} // namespace installer

Powered by Google App Engine
This is Rietveld 408576698