OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ | |
6 #define SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "sync/base/sync_export.h" | |
10 #include "sync/syncable/directory_backing_store.h" | |
11 | |
12 namespace syncer { | |
13 namespace syncable { | |
14 | |
15 // This is the concrete class that provides a useful implementation of | |
16 // DirectoryBackingStore. | |
17 class SYNC_EXPORT_PRIVATE DeferredOnDiskDirectoryBackingStore | |
Nicolas Zea
2014/08/11 18:12:25
Does this need to be an implementation of Director
haitaol1
2014/08/11 18:49:09
I feel it's cleaner to use a separate class given
| |
18 : public DirectoryBackingStore { | |
19 public: | |
20 DeferredOnDiskDirectoryBackingStore(const std::string& dir_name, | |
21 const base::FilePath& backing_filepath); | |
22 virtual ~DeferredOnDiskDirectoryBackingStore(); | |
23 virtual DirOpenResult Load( | |
24 Directory::MetahandlesMap* handles_map, | |
25 JournalIndex* delete_journals, | |
26 Directory::KernelLoadInfo* kernel_load_info) OVERRIDE; | |
27 virtual bool SaveChanges(const Directory::SaveChangesSnapshot& snapshot) | |
28 OVERRIDE; | |
29 | |
30 private: | |
31 base::FilePath backing_filepath_; | |
32 | |
33 // Whether current DB is on disk. | |
34 bool db_is_on_disk_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(DeferredOnDiskDirectoryBackingStore); | |
37 }; | |
38 | |
39 } // namespace syncable | |
40 } // namespace syncer | |
41 | |
42 #endif // SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ | |
OLD | NEW |