diff options
author | bcwhite <bcwhite@chromium.org> | 2015-07-09 03:58:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-09 10:59:17 +0000 |
commit | 974453e16791b896bdce75273402834db414a0e9 (patch) | |
tree | c4c4ff689e8ca406b3df20a0817a9a7aefee86df /chrome/installer/setup/setup_util.cc | |
parent | 4c711b5767ccea7095621defa2fb77580a132cca (diff) | |
download | chromium_src-974453e16791b896bdce75273402834db414a0e9.zip chromium_src-974453e16791b896bdce75273402834db414a0e9.tar.gz chromium_src-974453e16791b896bdce75273402834db414a0e9.tar.bz2 |
Use --previous-version command-line parameter.
If that parameter is provided, match only that specific version
of an install.
BUG=385419
Review URL: https://codereview.chromium.org/1220193008
Cr-Commit-Position: refs/heads/master@{#338011}
Diffstat (limited to 'chrome/installer/setup/setup_util.cc')
-rw-r--r-- | chrome/installer/setup/setup_util.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc index 99ea3f5..7f0af71 100644 --- a/chrome/installer/setup/setup_util.cc +++ b/chrome/installer/setup/setup_util.cc @@ -169,7 +169,14 @@ Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path) { } base::FilePath FindArchiveToPatch(const InstallationState& original_state, - const InstallerState& installer_state) { + const InstallerState& installer_state, + const base::Version& desired_version) { + if (desired_version.IsValid()) { + base::FilePath archive(installer_state.GetInstallerDirectory( + desired_version).Append(kChromeArchive)); + return base::PathExists(archive) ? archive : base::FilePath(); + } + // Check based on the version number advertised to Google Update, since that // is the value used to select a specific differential update. If an archive // can't be found using that, fallback to using the newest version present. |