| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 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. | |
| 4 | |
| 5 #ifndef CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_ | |
| 6 #define CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/files/file_path.h" | |
| 10 | |
| 11 namespace installer_test { | |
| 12 | |
| 13 // Locate and provides path for installers. | |
| 14 // Search for latest installer binaries in the filer directory defined by | |
| 15 // mini_installer_constants::kChromeInstallersLocation. | |
| 16 class InstallerPathProvider { | |
| 17 public: | |
| 18 // Search for latest installer binaries in filer. | |
| 19 InstallerPathProvider(); | |
| 20 | |
| 21 explicit InstallerPathProvider(const std::string& build_under_test); | |
| 22 ~InstallerPathProvider(); | |
| 23 | |
| 24 bool GetFullInstaller(base::FilePath* path); | |
| 25 bool GetDiffInstaller(base::FilePath* path); | |
| 26 bool GetMiniInstaller(base::FilePath* path); | |
| 27 bool GetPreviousInstaller(base::FilePath* path); | |
| 28 bool GetStandaloneInstaller(base::FilePath* path); | |
| 29 bool GetSignedStandaloneInstaller(base::FilePath* path); | |
| 30 | |
| 31 std::string GetCurrentBuild(); | |
| 32 std::string GetPreviousBuild(); | |
| 33 | |
| 34 private: | |
| 35 // Returns the local file path for the given file |name|. | |
| 36 // Assumes file is located in the current working directory. | |
| 37 base::FilePath PathFromExeDir(const base::FilePath::StringType& name); | |
| 38 | |
| 39 bool GetInstaller(const std::string& pattern, base::FilePath* path); | |
| 40 | |
| 41 // Build numbers. | |
| 42 std::string current_build_, previous_build_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(InstallerPathProvider); | |
| 45 }; | |
| 46 | |
| 47 } // namespace | |
| 48 | |
| 49 #endif // CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_ | |
| OLD | NEW |