diff options
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/util/install_util.cc | 8 | ||||
-rw-r--r-- | chrome/installer/util/install_util.h | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index 043061b..554fa84 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -211,6 +211,14 @@ bool InstallUtil::IsPerUserInstall(const wchar_t* const exe_path) { return true; } +bool InstallUtil::IsMultiInstall(BrowserDistribution* dist, + bool system_install) { + DCHECK(dist); + ProductState state; + return state.Initialize(system_install, dist->GetType()) && + state.is_multi_install(); +} + bool CheckIsChromeSxSProcess() { CommandLine* command_line = CommandLine::ForCurrentProcess(); CHECK(command_line); diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h index 0106f4c..4b525b2 100644 --- a/chrome/installer/util/install_util.h +++ b/chrome/installer/util/install_util.h @@ -70,6 +70,10 @@ class InstallUtil { // Program Files). static bool IsPerUserInstall(const wchar_t* const exe_path); + // Returns true if the installation represented by the pair of |dist| and + // |system_level| is a multi install. + static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); + // Returns true if this is running setup process for Chrome SxS (as // indicated by the presence of --chrome-sxs on the command line) or if this // is running Chrome process from the Chrome SxS installation (as indicated |