OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_ | 5 #ifndef SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_ |
6 #define SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_ | 6 #define SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "sync/syncable/directory_backing_store.h" | 9 #include "sync/syncable/directory_backing_store.h" |
10 | 10 |
11 namespace syncer { | 11 namespace syncer { |
12 namespace syncable { | 12 namespace syncable { |
13 | 13 |
14 // This implementation of DirectoryBackingStore does not manage its own | 14 // This implementation of DirectoryBackingStore does not manage its own |
15 // database. This makes it more flexible (and more complex) than the | 15 // database. This makes it more flexible (and more complex) than the |
16 // InMemoryDirectoryBackingStore. | 16 // InMemoryDirectoryBackingStore. |
17 class TestDirectoryBackingStore : public DirectoryBackingStore { | 17 class TestDirectoryBackingStore : public DirectoryBackingStore { |
18 public: | 18 public: |
19 // This constructor takes a handle to a database. The caller maintains | 19 // This constructor takes a handle to a database. The caller maintains |
20 // ownership of this handle. | 20 // ownership of this handle. |
21 // | 21 // |
22 // This is very brittle. You should not be using this class or this | 22 // This is very brittle. You should not be using this class or this |
23 // constructor unless you understand and intend to test the | 23 // constructor unless you understand and intend to test the |
24 // DirectoryBackingStore's internals. | 24 // DirectoryBackingStore's internals. |
25 TestDirectoryBackingStore(const std::string& dir_name, | 25 TestDirectoryBackingStore(const std::string& dir_name, |
26 sql::Connection* connection); | 26 sql::Connection* connection); |
27 virtual ~TestDirectoryBackingStore(); | 27 virtual ~TestDirectoryBackingStore(); |
28 virtual DirOpenResult Load( | 28 virtual DirOpenResult Load( |
29 MetahandlesIndex* entry_bucket, | 29 MetahandlesIndex* entry_bucket, |
| 30 JournalIndex* delete_journals, |
30 Directory::KernelLoadInfo* kernel_load_info) OVERRIDE; | 31 Directory::KernelLoadInfo* kernel_load_info) OVERRIDE; |
31 | 32 |
32 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion67To68); | 33 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion67To68); |
33 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion68To69); | 34 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion68To69); |
34 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion69To70); | 35 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion69To70); |
35 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion70To71); | 36 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion70To71); |
36 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion71To72); | 37 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion71To72); |
37 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion72To73); | 38 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion72To73); |
38 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion73To74); | 39 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion73To74); |
39 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion74To75); | 40 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MigrateVersion74To75); |
(...skipping 13 matching lines...) Expand all Loading... |
53 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, DeleteEntries); | 54 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, DeleteEntries); |
54 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, GenerateCacheGUID); | 55 FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, GenerateCacheGUID); |
55 FRIEND_TEST_ALL_PREFIXES(MigrationTest, ToCurrentVersion); | 56 FRIEND_TEST_ALL_PREFIXES(MigrationTest, ToCurrentVersion); |
56 friend class MigrationTest; | 57 friend class MigrationTest; |
57 }; | 58 }; |
58 | 59 |
59 } // namespace syncable | 60 } // namespace syncable |
60 } // namespace syncer | 61 } // namespace syncer |
61 | 62 |
62 #endif // SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_ | 63 #endif // SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_ |
OLD | NEW |