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

Unified Diff: chrome/installer/util/installer_state.cc

Issue 11413029: Uninstall Chrome + has App Host + not App Launcher => Uninstall App Host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installer_state.cc
diff --git a/chrome/installer/util/installer_state.cc b/chrome/installer/util/installer_state.cc
index b7ab42ba04e7635808035d563462fb39292e7a5c..34c38d6c927b711ff47e627a9f4e4693cbc2e5fa 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -132,7 +132,23 @@ void InstallerState::Initialize(const CommandLine& command_line,
VLOG(1) << (is_uninstall ? "Uninstall" : "Install")
<< " distribution: " << p->distribution()->GetAppShortCutName();
}
- if (prefs.install_chrome_app_host()) {
+
+ // If Chrome is being uninstalled, and (non-App Launcher) App Host exists,
grt (UTC plus 2) 2012/11/16 04:25:17 suggest "Uninstall App Host if Chrome is being uni
grt (UTC plus 2) 2012/11/16 04:25:17 please consider if this logic belongs in the "if (
huangs 2012/11/16 16:48:57 Done. Added more comments regarding mix of system
huangs 2012/11/16 16:48:57 Done, but with slight code duplication.
+ // then also uninstall App Host.
+ bool also_uninstall_app_host = false;
+ if (is_uninstall && prefs.install_chrome()) {
+ bool system_level_app_host = false;
erikwright (departed) 2012/11/16 02:59:19 I don't see the merit of this boolean variable, no
huangs 2012/11/16 16:48:57 Done.
+ const ProductState* app_host_state = machine_state.GetProductState(
+ system_level_app_host, BrowserDistribution::CHROME_APP_HOST);
+ also_uninstall_app_host = app_host_state &&
+ !CommandLine(app_host_state->uninstall_command())
grt (UTC plus 2) 2012/11/16 04:25:17 !app_host_state->uninstall_command().HasSwitch(...
huangs 2012/11/16 16:48:57 Done. Also fixing same goof in install.cc
+ .HasSwitch(switches::kChromeAppLauncher);
+ }
+
+ if (prefs.install_chrome_app_host() || also_uninstall_app_host) {
+ if (!prefs.install_chrome_app_host()) {
+ VLOG(1) << "Uninstalling App Host along with Chrome.";
+ }
Product* p =
AddProductFromPreferences(BrowserDistribution::CHROME_APP_HOST, prefs,
machine_state);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698