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
{
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();
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
);
42 std::string current_build_
, previous_build_
;
44 DISALLOW_COPY_AND_ASSIGN(InstallerPathProvider
);
49 #endif // CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_PATH_PROVIDER_H_