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 "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 void SetUp() override; | 40 void SetUp() override; |
41 void TearDown() override; | 41 void TearDown() override; |
42 | 42 |
43 // Creates the HistoryBackend and HistoryDatabase on the current thread, | 43 // Creates the HistoryBackend and HistoryDatabase on the current thread, |
44 // assigning the values to backend_ and db_. | 44 // assigning the values to backend_ and db_. |
45 void CreateBackendAndDatabase(); | 45 void CreateBackendAndDatabase(); |
46 void CreateBackendAndDatabaseAllowFail(); | 46 void CreateBackendAndDatabaseAllowFail(); |
47 | 47 |
48 void CreateDBVersion(int version); | 48 void CreateDBVersion(int version); |
49 | 49 |
50 void CreateArchivedDB(); | |
51 | |
52 void DeleteBackend(); | 50 void DeleteBackend(); |
53 | 51 |
54 bool AddDownload(uint32 id, DownloadState state, base::Time time); | 52 bool AddDownload(uint32 id, DownloadState state, base::Time time); |
55 | 53 |
56 base::ScopedTempDir temp_dir_; | 54 base::ScopedTempDir temp_dir_; |
57 | 55 |
58 base::MessageLoopForUI message_loop_; | 56 base::MessageLoopForUI message_loop_; |
59 | 57 |
60 // names of the database files | 58 // names of the database files |
61 base::FilePath history_dir_; | 59 base::FilePath history_dir_; |
62 | 60 |
63 // Created via CreateBackendAndDatabase. | 61 // Created via CreateBackendAndDatabase. |
64 scoped_refptr<HistoryBackend> backend_; | 62 scoped_refptr<HistoryBackend> backend_; |
65 scoped_ptr<InMemoryHistoryBackend> in_mem_backend_; | 63 scoped_ptr<InMemoryHistoryBackend> in_mem_backend_; |
66 HistoryDatabase* db_; // Cached reference to the backend's database. | 64 HistoryDatabase* db_; // Cached reference to the backend's database. |
67 sql::InitStatus last_profile_error_; | 65 sql::InitStatus last_profile_error_; |
68 }; | 66 }; |
69 | 67 |
70 } // namespace history | 68 } // namespace history |
71 | 69 |
72 #endif // COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ | 70 #endif // COMPONENTS_HISTORY_CORE_TEST_HISTORY_BACKEND_DB_BASE_TEST_H_ |
OLD | NEW |