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

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

Issue 10957016: Ensuring Google Update at user-level is installed alongside App Host, for the quick-enable App Host… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/setup_main.cc
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index c101bb5f6c9b8a211c41538a8b3149921406e498..ffd19c6d6b3701829d8646d64853e2aeaed3c401 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -39,6 +39,7 @@
#include "chrome/installer/util/delete_tree_work_item.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/google_update_settings.h"
+#include "chrome/installer/util/google_update_util.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/html_dialog.h"
#include "chrome/installer/util/install_util.h"
@@ -734,7 +735,11 @@ installer::InstallStatus InstallProductsHelper(
case kGCFBit | kBrowserBit:
message_id = IDS_INSTALL_HIGHER_VERSION_CB_CF_BASE;
break;
+ case kAppHostBit:
+ message_id = IDS_INSTALL_HIGHER_VERSION_APP_HOST_BASE;
+ break;
default:
+ // TODO: Get a more appropriate message for other subsets.
grt (UTC plus 2) 2012/09/20 17:58:51 TODO(who?)
message_id = IDS_INSTALL_HIGHER_VERSION_APP_HOST_BASE;
erikwright (departed) 2012/09/20 18:00:01 I think that this message is actually generic (doe
huangs 2012/09/21 01:43:14 Reverting and no-op, per discussion.
break;
}
@@ -851,6 +856,20 @@ installer::InstallStatus InstallProductsHelper(
}
}
+ // Install Google Update, if it is not installed already.
grt (UTC plus 2) 2012/09/20 17:58:51 no comma
huangs 2012/09/21 01:43:14 Done.
+ // This is for quick-enable App Host install via system-level Google Update.
erikwright (departed) 2012/09/20 18:00:01 via ... -> from a system-level Chrome Binaries ins
huangs 2012/09/21 01:43:14 Done.
+ if (cmd_line.HasSwitch(installer::switches::kEnsureGoogleUpdateInstalled)) {
+ // Currently this feature is only needed by, and implemented for user-level.
erikwright (departed) 2012/09/20 18:00:01 Remove this comment and edit line 859 to say somet
huangs 2012/09/21 01:43:14 Done, merged with earlier comment, too.
+ if (!system_install) {
+ if (!google_update::EnsureUserLevelGoogleUpdateInstalled()) {
grt (UTC plus 2) 2012/09/20 17:58:51 no braces
huangs 2012/09/21 01:43:14 Done.
+ LOG(ERROR) << "Failed to install Google Update";
+ }
+ } else {
+ LOG(ERROR) << "--" << installer::switches::kEnsureGoogleUpdateInstalled
grt (UTC plus 2) 2012/09/20 17:58:51 this belongs in CheckAppHostPreconditions, no?
huangs 2012/09/21 01:43:14 Talked to erikwright@: Moving the check for user-l
+ << " is for user level only";
+ }
+ }
+
// Delete the master profile file if present. Note that we do not care about
// rollback here and we schedule for deletion on reboot if the delete fails.
// As such, we do not use DeleteTreeWorkItem.
@@ -1094,16 +1113,14 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state,
GoogleUpdateSettings::SetEULAConsent(
original_state, BrowserDistribution::GetDistribution(), true);
}
- } else if (cmd_line.HasSwitch(
- installer::switches::kConfigureUserSettings)) {
+ } else if (cmd_line.HasSwitch(installer::switches::kConfigureUserSettings)) {
DCHECK(installer_state->system_install());
const Product* chrome_install =
installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER);
DCHECK(chrome_install);
// TODO(gab): Implement the new shortcut functionality here.
LOG(ERROR) << "--configure-user-settings is not implemented.";
- } else if (cmd_line.HasSwitch(
- installer::switches::kRegisterChromeBrowser)) {
+ } else if (cmd_line.HasSwitch(installer::switches::kRegisterChromeBrowser)) {
installer::InstallStatus status = installer::UNKNOWN_STATUS;
const Product* chrome_install =
installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER);
@@ -1132,8 +1149,7 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state,
suffix = cmd_line.GetSwitchValueNative(
installer::switches::kRegisterChromeBrowserSuffix);
}
- if (cmd_line.HasSwitch(
- installer::switches::kRegisterURLProtocol)) {
+ if (cmd_line.HasSwitch(installer::switches::kRegisterURLProtocol)) {
string16 protocol = cmd_line.GetSwitchValueNative(
installer::switches::kRegisterURLProtocol);
// ShellUtil::RegisterChromeForProtocol performs all registration

Powered by Google App Engine
This is Rietveld 408576698