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