1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file exposes the public interface to the mini_installer re-versioner.
7 #ifndef CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_
8 #define CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_
17 namespace upgrade_test
{
24 // Generates an alternate mini_installer.exe using the one indicated by
25 // |original_installer_path|, giving the new one a lower or higher version than
26 // the original and placing it in |target_path|. Any previous file at
27 // |target_path| is clobbered. Returns true on success. |original_version| and
28 // |new_version|, when non-NULL, are given the original and new version numbers
30 bool GenerateAlternateVersion(const base::FilePath
& original_installer_path
,
31 const base::FilePath
& target_path
,
33 std::wstring
* original_version
,
34 std::wstring
* new_version
);
36 // Given a path to a PEImage in |original_file|, copy that file to
37 // |target_file|, modifying the version of the copy according to |direction|.
38 // Any previous file at |target_file| is clobbered. Returns true on success.
39 // Note that |target_file| may still be mutated on failure.
40 bool GenerateAlternatePEFileVersion(const base::FilePath
& original_file
,
41 const base::FilePath
& target_file
,
44 // Given a path to a PEImage in |original_file|, copy that file to
45 // |target_file|, modifying the version of the copy according to |version|.
46 // Any previous file at |target_file| is clobbered. Returns true on success.
47 // Note that |target_file| may still be mutated on failure.
48 bool GenerateSpecificPEFileVersion(const base::FilePath
& original_file
,
49 const base::FilePath
& target_file
,
50 const base::Version
& version
);
52 } // namespace upgrade_test
54 #endif // CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_