Chromium Code Reviews| Index: chrome/installer/util/installation_validator.cc |
| diff --git a/chrome/installer/util/installation_validator.cc b/chrome/installer/util/installation_validator.cc |
| index b8812d33eddeae42965e310a81c4d69a690bf749..bdccf2daefe0974c6635390006fc9a068b534a8c 100644 |
| --- a/chrome/installer/util/installation_validator.cc |
| +++ b/chrome/installer/util/installation_validator.cc |
| @@ -392,28 +392,15 @@ void InstallationValidator::ValidateBinaries( |
| << "\""; |
| } |
| - // ap must have -applauncher iff Chrome App Launcher is installed multi |
| - const ProductState* app_host_state = machine_state.GetProductState( |
| - system_install, BrowserDistribution::CHROME_APP_HOST); |
| - if (app_host_state != NULL) { |
| - if (!app_host_state->is_multi_install()) { |
| - *is_valid = false; |
| - LOG(ERROR) << "Chrome App Launcher is installed in non-multi mode."; |
| - } |
| - if (!channel.IsAppLauncher()) { |
| - *is_valid = false; |
| - LOG(ERROR) << "Chrome Binaries are missing \"-applauncher\" in channel" |
| - " name: \"" << channel.value() << "\""; |
| - } |
| - } else if (channel.IsAppLauncher()) { |
| + // ap must not have -applauncher. |
| + if (channel.IsAppLauncher()) { |
|
robertshield
2015/01/23 22:45:30
isn't applauncher dead again?
grt (UTC plus 2)
2015/01/24 02:25:16
huangs@ is removing heroic swaths of code in https
|
| *is_valid = false; |
| - LOG(ERROR) << "Chrome Binaries have \"-applauncher\" in channel name, yet " |
| - "Chrome App Launcher is not installed: \"" << channel.value() |
| - << "\""; |
| + LOG(ERROR) << "Chrome Binaries have \"-applauncher\" in channel name: \"" |
| + << channel.value() << "\""; |
| } |
| - // Chrome, Chrome Frame, or App Host must be present |
| - if (chrome_state == NULL && cf_state == NULL && app_host_state == NULL) { |
| + // Chrome or Chrome Frame must be present |
| + if (chrome_state == NULL && cf_state == NULL) { |
| *is_valid = false; |
| LOG(ERROR) << "Chrome Binaries are present with no other products."; |
| } |
| @@ -425,12 +412,12 @@ void InstallationValidator::ValidateBinaries( |
| << "Chrome Binaries are present yet Chrome is not multi-install."; |
| } |
| - // Chrome Frame must be multi-install if Chrome & App Host are not present. |
| - if (cf_state != NULL && app_host_state == NULL && chrome_state == NULL && |
| + // Chrome Frame must be multi-install if Chrome is not present. |
| + if (cf_state != NULL && chrome_state == NULL && |
| !cf_state->is_multi_install()) { |
| *is_valid = false; |
| - LOG(ERROR) << "Chrome Binaries are present without Chrome nor App Launcher " |
| - << "yet Chrome Frame is not multi-install."; |
| + LOG(ERROR) << "Chrome Binaries are present without Chrome yet Chrome Frame " |
| + "is not multi-install."; |
| } |
| ChromeBinariesRules binaries_rules; |
| @@ -706,6 +693,22 @@ bool InstallationValidator::ValidateInstallationTypeForState( |
| ProductBits::CHROME_MULTI : |
| ProductBits::CHROME_SINGLE)); |
| } |
| + // Usage of the app launcher is tracked alongside Chrome. |
| + const ProductState* launcher_state = |
| + machine_state.GetProductState(system_level, |
| + BrowserDistribution::CHROME_APP_HOST); |
| + BrowserDistribution* chrome_dist = |
| + BrowserDistribution::GetSpecificDistribution( |
| + BrowserDistribution::CHROME_BROWSER); |
| + if (!launcher_state) { |
| + LOG_IF(ERROR, product_state) |
| + << "App launcher is not installed with " |
| + << chrome_dist->GetDisplayName(); |
| + } else { |
| + LOG_IF(ERROR, !product_state) |
| + << "App launcher is installed without " |
| + << chrome_dist->GetDisplayName(); |
| + } |
| // Is Chrome Frame installed? |
| product_state = |
| @@ -721,21 +724,6 @@ bool InstallationValidator::ValidateInstallationTypeForState( |
| *type = static_cast<InstallationType>(*type | cf_bit); |
| } |
| - // Is Chrome App Host installed? |
| - product_state = |
| - machine_state.GetProductState(system_level, |
| - BrowserDistribution::CHROME_APP_HOST); |
| - if (product_state != NULL) { |
| - ChromeAppHostRules chrome_app_host_rules; |
| - ValidateProduct(machine_state, system_level, *product_state, |
| - chrome_app_host_rules, &rock_on); |
| - *type = static_cast<InstallationType>(*type | ProductBits::CHROME_APP_HOST); |
| - if (!product_state->is_multi_install()) { |
| - LOG(ERROR) << "Chrome App Launcher must always be multi-install."; |
| - rock_on = false; |
| - } |
| - } |
| - |
| DCHECK_NE(std::find(&kInstallationTypes[0], |
| &kInstallationTypes[arraysize(kInstallationTypes)], |
| *type), |