| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file exposes the public interface to the mini_installer re-versioner. | 5 // This file exposes the public interface to the mini_installer re-versioner. |
| 6 | 6 |
| 7 #ifndef CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_ | 7 #ifndef CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_ |
| 8 #define CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_ | 8 #define CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 class FilePath; | 13 class FilePath; |
| 14 | 14 |
| 15 namespace upgrade_test { | 15 namespace upgrade_test { |
| 16 | 16 |
| 17 enum Direction { |
| 18 PREVIOUS_VERSION, |
| 19 NEXT_VERSION |
| 20 }; |
| 21 |
| 17 // Generates an alternate mini_installer.exe using the one indicated by | 22 // Generates an alternate mini_installer.exe using the one indicated by |
| 18 // |original_installer_path|, giving the new one a higher version than the | 23 // |original_installer_path|, giving the new one a lower or higher version than |
| 19 // original and placing it in |target_path|. Any previous file at |target_path| | 24 // the original and placing it in |target_path|. Any previous file at |
| 20 // is clobbered. Returns true on success. | 25 // |target_path| is clobbered. Returns true on success. |original_version| and |
| 21 bool GenerateNextVersion(const FilePath& original_installer_path, | 26 // |new_version|, when non-NULL, are given the original and new version numbers |
| 22 const FilePath& target_path); | 27 // on success. |
| 28 bool GenerateAlternateVersion(const FilePath& original_installer_path, |
| 29 const FilePath& target_path, |
| 30 Direction direction, |
| 31 std::wstring* original_version, |
| 32 std::wstring* new_version); |
| 23 | 33 |
| 24 } // namespace upgrade_test | 34 } // namespace upgrade_test |
| 25 | 35 |
| 26 #endif // CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_ | 36 #endif // CHROME_INSTALLER_TEST_ALTERNATE_VERSION_GENERATOR_H_ |
| OLD | NEW |