| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ | 6 #define COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
| 14 #include "base/files/scoped_temp_dir.h" | 14 #include "base/files/scoped_temp_dir.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/message_loop/message_loop.h" | 16 #include "base/test/scoped_task_environment.h" |
| 17 #include "components/history/core/test/history_unittest_base.h" | 17 #include "components/history/core/test/history_unittest_base.h" |
| 18 #include "sql/init_status.h" | 18 #include "sql/init_status.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 class Time; | 21 class Time; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace history { | 24 namespace history { |
| 25 | 25 |
| 26 class BackendDelegate; | 26 class BackendDelegate; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 52 | 52 |
| 53 void DeleteBackend(); | 53 void DeleteBackend(); |
| 54 | 54 |
| 55 bool AddDownload(uint32_t id, | 55 bool AddDownload(uint32_t id, |
| 56 const std::string& guid, | 56 const std::string& guid, |
| 57 DownloadState state, | 57 DownloadState state, |
| 58 base::Time time); | 58 base::Time time); |
| 59 | 59 |
| 60 base::ScopedTempDir temp_dir_; | 60 base::ScopedTempDir temp_dir_; |
| 61 | 61 |
| 62 base::MessageLoopForUI message_loop_; | 62 base::test::ScopedTaskEnvironment scoped_task_environment_; |
| 63 | 63 |
| 64 // names of the database files | 64 // names of the database files |
| 65 base::FilePath history_dir_; | 65 base::FilePath history_dir_; |
| 66 | 66 |
| 67 // Created via CreateBackendAndDatabase. | 67 // Created via CreateBackendAndDatabase. |
| 68 scoped_refptr<HistoryBackend> backend_; | 68 scoped_refptr<HistoryBackend> backend_; |
| 69 std::unique_ptr<InMemoryHistoryBackend> in_mem_backend_; | 69 std::unique_ptr<InMemoryHistoryBackend> in_mem_backend_; |
| 70 HistoryDatabase* db_; // Cached reference to the backend's database. | 70 HistoryDatabase* db_; // Cached reference to the backend's database. |
| 71 sql::InitStatus last_profile_error_; | 71 sql::InitStatus last_profile_error_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace history | 74 } // namespace history |
| 75 | 75 |
| 76 #endif // COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ | 76 #endif // COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ |
| OLD | NEW |