diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 06:00:25 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 06:00:25 +0000 |
commit | bf6117c7e9b66f3648af83c047a3428d66353451 (patch) | |
tree | 42d42291596c7b70ff1bdace230473277d5a1cd5 /chrome/installer/util/helper.h | |
parent | 8a0989f01fff18edb0f56dcc06db2742eb6a1dcb (diff) | |
download | chromium_src-bf6117c7e9b66f3648af83c047a3428d66353451.zip chromium_src-bf6117c7e9b66f3648af83c047a3428d66353451.tar.gz chromium_src-bf6117c7e9b66f3648af83c047a3428d66353451.tar.bz2 |
Refactor the installer to support multi-install.
The installer now does its work based on distributions and target installation paths.
Each distribution has exactly one target installation path but each installation path can have more than one distribution.
In the absense of the --multi-install switch, the installer should continue to work as before.
The biggest difference here is that we don't rely on a single global distribution object that controls the entire installation flow and we have a few classes for the new abstractions instead of global functions.
It's far from perfect, but it's a step towards separating the core file package required for all distributions from the distributions themselves.
Additionally, there are tons of little changes here such as consistant usage of FilePath and CommandLine instead of mixing them with std::wstring.
TEST=Install, uninstall, upgrade, etc. Everything install related.
BUG=61609
Review URL: http://codereview.chromium.org/5172011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/helper.h')
-rw-r--r-- | chrome/installer/util/helper.h | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/chrome/installer/util/helper.h b/chrome/installer/util/helper.h index dd4c3b8..747e11b 100644 --- a/chrome/installer/util/helper.h +++ b/chrome/installer/util/helper.h @@ -8,7 +8,9 @@ #define CHROME_INSTALLER_UTIL_HELPER_H_ #pragma once -#include <string> +#include "base/file_path.h" + +class BrowserDistribution; namespace installer { @@ -17,34 +19,13 @@ namespace installer { // system_install: if true, the function returns system wide location // (ProgramFiles\Google). Otherwise it returns user specific // location (Document And Settings\<user>\Local Settings...) -std::wstring GetChromeInstallPath(bool system_install); +FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist); // This function returns the path to the directory that holds the user data, // this is always inside "Document And Settings\<user>\Local Settings.". Note // that this is the default user data directory and does not take into account // that it can be overriden with a command line parameter. -std::wstring GetChromeUserDataPath(); - -// Launches Chrome without waiting for its exit. -bool LaunchChrome(bool system_install); - -// Launches Chrome with given command line, waits for Chrome indefinitely -// (until it terminates), and gets the process exit code if available. -// The function returns true as long as Chrome is successfully launched. -// The status of Chrome at the return of the function is given by exit_code. -bool LaunchChromeAndWaitForResult(bool system_install, - const std::wstring& options, - int32* exit_code); - -// This function tries to remove all previous version directories after a new -// Chrome update. If an instance of Chrome with older version is still running -// on the system, its corresponding version directory will be left intact. -// (The version directory is subject for removal again during next update.) -// -// chrome_path: the root path of Chrome installation. -// latest_version_str: the latest version of Chrome installed. -void RemoveOldVersionDirs(const std::wstring& chrome_path, - const std::wstring& latest_version_str); +FilePath GetChromeUserDataPath(BrowserDistribution* dist); } // namespace installer |