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

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

Issue 11267023: Implementing --app-launcher install/uninstall flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits; added localized string for App Launcher uninstall shortcut. Created 8 years, 2 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/util/chrome_app_host_operations.cc ('k') | chrome/installer/util/master_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installation_validator.cc
diff --git a/chrome/installer/util/installation_validator.cc b/chrome/installer/util/installation_validator.cc
index 34462f615180c3a1865f1b6cd97b41fb0a967c79..0c538b4b42be7ed134ef2e2a08734d9282b830c4 100644
--- a/chrome/installer/util/installation_validator.cc
+++ b/chrome/installer/util/installation_validator.cc
@@ -115,13 +115,18 @@ void InstallationValidator::ChromeAppHostRules::AddUninstallSwitchExpectations(
SwitchExpectations* expectations) const {
DCHECK(!ctx.system_install);
- // --app-host must be present.
- expectations->push_back(std::make_pair(std::string(switches::kChromeAppHost),
- true));
+ // Either --app-launcher or --app-host must be present.
+ if (ctx.state.channel().IsAppLauncher()) {
+ expectations->push_back(
+ std::make_pair(std::string(switches::kChromeAppLauncher), true));
+ } else {
+ expectations->push_back(
+ std::make_pair(std::string(switches::kChromeAppHost), true));
+ }
+
// --chrome must not be present.
expectations->push_back(std::make_pair(std::string(switches::kChrome),
false));
-
// --chrome-frame must not be present.
expectations->push_back(std::make_pair(std::string(switches::kChromeFrame),
false));
@@ -480,16 +485,22 @@ void InstallationValidator::ValidateBinaries(
*is_valid = false;
LOG(ERROR) << "Chrome App Host is installed in non-multi mode.";
}
- if (!channel.IsAppHost()) {
+ if (!channel.IsAppHost() && !channel.IsAppLauncher()) {
*is_valid = false;
- LOG(ERROR) << "Chrome Binaries are missing \"-apphost\" in channel"
- " name: \"" << channel.value() << "\"";
+ LOG(ERROR) << "Chrome Binaries are missing \"-apphost\" and"
+ " \"-applauncher\" in channel name: \""
+ << channel.value() << "\"";
}
} else if (channel.IsAppHost()) {
*is_valid = false;
LOG(ERROR) << "Chrome Binaries have \"-apphost\" in channel name, yet "
"Chrome App Host is not installed: \"" << channel.value()
<< "\"";
+ } else if (channel.IsAppLauncher()) {
+ *is_valid = false;
+ LOG(ERROR) << "Chrome Binaries have \"-applauncher\" in channel name, yet "
+ "Chrome App Launcher is not installed: \"" << channel.value()
+ << "\"";
}
// Chrome, Chrome Frame, or App Host must be present
« no previous file with comments | « chrome/installer/util/chrome_app_host_operations.cc ('k') | chrome/installer/util/master_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698