| 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_TEST_INSTALLER_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_TEST_TEST_INSTALLER_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "components/update_client/update_client.h" | 12 #include "components/update_client/update_client.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class DictionaryValue; | 15 class DictionaryValue; |
| 16 } | 16 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 27 void OnUpdateError(int error) override; | 27 void OnUpdateError(int error) override; |
| 28 | 28 |
| 29 bool Install(const base::DictionaryValue& manifest, | 29 bool Install(const base::DictionaryValue& manifest, |
| 30 const base::FilePath& unpack_path) override; | 30 const base::FilePath& unpack_path) override; |
| 31 | 31 |
| 32 bool GetInstalledFile(const std::string& file, | 32 bool GetInstalledFile(const std::string& file, |
| 33 base::FilePath* installed_file) override; | 33 base::FilePath* installed_file) override; |
| 34 | 34 |
| 35 bool Uninstall() override; | 35 bool Uninstall() override; |
| 36 | 36 |
| 37 int error() const { | 37 int error() const { return error_; } |
| 38 return error_; | |
| 39 } | |
| 40 | 38 |
| 41 int install_count() const { | 39 int install_count() const { return install_count_; } |
| 42 return install_count_; | |
| 43 } | |
| 44 | 40 |
| 45 protected: | 41 protected: |
| 46 ~TestInstaller() override; | 42 ~TestInstaller() override; |
| 47 | 43 |
| 48 int error_; | 44 int error_; |
| 49 int install_count_; | 45 int install_count_; |
| 50 }; | 46 }; |
| 51 | 47 |
| 52 // A ReadOnlyTestInstaller is an installer that knows about files in an existing | 48 // A ReadOnlyTestInstaller is an installer that knows about files in an existing |
| 53 // directory. It will not write to the directory. | 49 // directory. It will not write to the directory. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 78 | 74 |
| 79 private: | 75 private: |
| 80 ~VersionedTestInstaller() override; | 76 ~VersionedTestInstaller() override; |
| 81 | 77 |
| 82 base::FilePath install_directory_; | 78 base::FilePath install_directory_; |
| 83 Version current_version_; | 79 Version current_version_; |
| 84 }; | 80 }; |
| 85 | 81 |
| 86 } // namespace update_client | 82 } // namespace update_client |
| 87 | 83 |
| 88 #endif // COMPONENTS_UPDATE_CLIENT_TEST_TEST_INSTALLER_H_ | 84 #endif // COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ |
| OLD | NEW |