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

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

Issue 869153004: Support migrating multi-install Chrome to single-install. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: verifier fix Created 5 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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/installer_state.h » ('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 5c0e25fc68be3b603a19347aef4607fc0db1e65e..0334ceb1c4c4d2fc2660d095df3e4b5de921d2be 100644
--- a/chrome/installer/util/installation_validator.cc
+++ b/chrome/installer/util/installation_validator.cc
@@ -11,13 +11,17 @@
#include <string>
#include "base/logging.h"
+#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "base/version.h"
+#include "base/win/registry.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/helper.h"
+#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/installation_state.h"
+#include "chrome/installer/util/updating_app_registration_data.h"
namespace installer {
@@ -552,6 +556,30 @@ bool InstallationValidator::ValidateInstallationTypeForState(
ProductBits::CHROME_SINGLE));
}
+#if defined(GOOGLE_CHROME_BUILD)
+ if (!InstallUtil::IsChromeSxSProcess()) {
+ // Usage of the app launcher is tracked alongside Chrome.
+ const HKEY root_key = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
+ base::string16 launcher_key(
+ UpdatingAppRegistrationData(kAppLauncherGuid).GetVersionKey());
+ base::win::RegKey key(root_key, launcher_key.c_str(),
+ KEY_QUERY_VALUE | KEY_WOW64_32KEY);
+ bool have_launcher =
+ key.Valid() && key.HasValue(google_update::kRegVersionField);
+
+ BrowserDistribution* chrome_dist =
+ BrowserDistribution::GetSpecificDistribution(
+ BrowserDistribution::CHROME_BROWSER);
+ if (!have_launcher) {
+ 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();
+ }
+ }
+#endif // GOOGLE_CHROME_BUILD
+
// Is Chrome Frame installed?
product_state =
machine_state.GetProductState(system_level,
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/installer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698