| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 int error() const { return error_; } | 36 int error() const { return error_; } |
| 37 | 37 |
| 38 int install_count() const { return install_count_; } | 38 int install_count() const { return install_count_; } |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 ~TestInstaller() override; | 41 ~TestInstaller() override; |
| 42 | 42 |
| 43 int error_; | 43 int error_; |
| 44 int install_count_; | 44 int install_count_; |
| 45 |
| 46 private: |
| 47 // Contains the |unpack_path| argument of the Install call. |
| 48 base::FilePath unpack_path_; |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 // A ReadOnlyTestInstaller is an installer that knows about files in an existing | 51 // A ReadOnlyTestInstaller is an installer that knows about files in an existing |
| 48 // directory. It will not write to the directory. | 52 // directory. It will not write to the directory. |
| 49 class ReadOnlyTestInstaller : public TestInstaller { | 53 class ReadOnlyTestInstaller : public TestInstaller { |
| 50 public: | 54 public: |
| 51 explicit ReadOnlyTestInstaller(const base::FilePath& installed_path); | 55 explicit ReadOnlyTestInstaller(const base::FilePath& installed_path); |
| 52 | 56 |
| 53 bool GetInstalledFile(const std::string& file, | 57 bool GetInstalledFile(const std::string& file, |
| 54 base::FilePath* installed_file) override; | 58 base::FilePath* installed_file) override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 74 private: | 78 private: |
| 75 ~VersionedTestInstaller() override; | 79 ~VersionedTestInstaller() override; |
| 76 | 80 |
| 77 base::FilePath install_directory_; | 81 base::FilePath install_directory_; |
| 78 base::Version current_version_; | 82 base::Version current_version_; |
| 79 }; | 83 }; |
| 80 | 84 |
| 81 } // namespace update_client | 85 } // namespace update_client |
| 82 | 86 |
| 83 #endif // COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ | 87 #endif // COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ |
| OLD | NEW |