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_HISTORY_DATABASE_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_HISTORY_DATABASE_TEST_UTILS_H_ |
6 #define COMPONENTS_HISTORY_CORE_HISTORY_DATABASE_TEST_UTILS_H_ | 6 #define COMPONENTS_HISTORY_CORE_HISTORY_DATABASE_TEST_UTILS_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class FilePath; | 11 class FilePath; |
12 } | 12 } |
13 | 13 |
14 namespace history { | 14 namespace history { |
15 | 15 |
| 16 // Sets |dir| to the path of the history data directory. Returns true on success |
| 17 // or false, in which case |dir| is undefined. |
| 18 WARN_UNUSED_RESULT bool GetTestDataHistoryDir(base::FilePath* dir); |
| 19 |
16 // Create the test database at |db_path| from the golden file at |ascii_path| in | 20 // Create the test database at |db_path| from the golden file at |ascii_path| in |
17 // the "history" subdir of the components test data dir. | 21 // the "history" subdir of the components test data dir. |
18 WARN_UNUSED_RESULT bool CreateDatabaseFromSQL(const base::FilePath& db_path, | 22 WARN_UNUSED_RESULT bool CreateDatabaseFromSQL(const base::FilePath& db_path, |
19 const char* ascii_path); | 23 const char* ascii_path); |
20 | 24 |
21 } // namespace history | 25 } // namespace history |
22 | 26 |
23 #endif // COMPONENTS_HISTORY_CORE_HISTORY_DATABASE_TEST_UTILS_H_ | 27 #endif // COMPONENTS_HISTORY_CORE_HISTORY_DATABASE_TEST_UTILS_H_ |
OLD | NEW |