Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / test / mini_installer_test / installer_path_provider.h
blob98e1b7788374164ddbea3ae6c0c82f4a8f98662c
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.
5 #ifndef CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_
6 #define CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_
8 #include "base/basictypes.h"
9 #include "base/files/file_path.h"
11 namespace installer_test {
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();
21 explicit InstallerPathProvider(const std::string& build_under_test);
22 ~InstallerPathProvider();
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);
31 std::string GetCurrentBuild();
32 std::string GetPreviousBuild();
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);
39 bool GetInstaller(const std::string& pattern, base::FilePath* path);
41 // Build numbers.
42 std::string current_build_, previous_build_;
44 DISALLOW_COPY_AND_ASSIGN(InstallerPathProvider);
47 } // namespace
49 #endif // CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_