OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "components/sync/base/sync_export.h" | |
13 #include "components/sync/syncable/directory_backing_store.h" | 12 #include "components/sync/syncable/directory_backing_store.h" |
14 | 13 |
15 namespace syncer { | 14 namespace syncer { |
16 namespace syncable { | 15 namespace syncable { |
17 | 16 |
18 // This is the concrete class that provides a useful implementation of | 17 // This is the concrete class that provides a useful implementation of |
19 // DirectoryBackingStore. | 18 // DirectoryBackingStore. |
20 class SYNC_EXPORT OnDiskDirectoryBackingStore : public DirectoryBackingStore { | 19 class OnDiskDirectoryBackingStore : public DirectoryBackingStore { |
21 public: | 20 public: |
22 OnDiskDirectoryBackingStore(const std::string& dir_name, | 21 OnDiskDirectoryBackingStore(const std::string& dir_name, |
23 const base::FilePath& backing_file_path); | 22 const base::FilePath& backing_file_path); |
24 ~OnDiskDirectoryBackingStore() override; | 23 ~OnDiskDirectoryBackingStore() override; |
25 DirOpenResult Load(Directory::MetahandlesMap* handles_map, | 24 DirOpenResult Load(Directory::MetahandlesMap* handles_map, |
26 JournalIndex* delete_journals, | 25 JournalIndex* delete_journals, |
27 MetahandleSet* metahandles_to_purge, | 26 MetahandleSet* metahandles_to_purge, |
28 Directory::KernelLoadInfo* kernel_load_info) override; | 27 Directory::KernelLoadInfo* kernel_load_info) override; |
29 | 28 |
30 protected: | 29 protected: |
(...skipping 14 matching lines...) Expand all Loading... |
45 // The path to the sync DB. | 44 // The path to the sync DB. |
46 const base::FilePath backing_file_path_; | 45 const base::FilePath backing_file_path_; |
47 | 46 |
48 DISALLOW_COPY_AND_ASSIGN(OnDiskDirectoryBackingStore); | 47 DISALLOW_COPY_AND_ASSIGN(OnDiskDirectoryBackingStore); |
49 }; | 48 }; |
50 | 49 |
51 } // namespace syncable | 50 } // namespace syncable |
52 } // namespace syncer | 51 } // namespace syncer |
53 | 52 |
54 #endif // COMPONENTS_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_ | 53 #endif // COMPONENTS_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_ |
OLD | NEW |