Index: sync/syncable/deferred_on_disk_directory_backing_store.h |
diff --git a/sync/syncable/deferred_on_disk_directory_backing_store.h b/sync/syncable/deferred_on_disk_directory_backing_store.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..77a5509cbb230d6c311a9c96f847e89a8adeb9fb |
--- /dev/null |
+++ b/sync/syncable/deferred_on_disk_directory_backing_store.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ |
+#define SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ |
+ |
+#include "base/files/file_path.h" |
+#include "sync/base/sync_export.h" |
+#include "sync/syncable/directory_backing_store.h" |
+ |
+namespace syncer { |
+namespace syncable { |
+ |
+// This is the concrete class that provides a useful implementation of |
+// DirectoryBackingStore. |
+class SYNC_EXPORT_PRIVATE DeferredOnDiskDirectoryBackingStore |
Nicolas Zea
2014/08/13 20:32:05
Update comment to be more clear about the changes
haitaol1
2014/08/14 01:30:34
Done.
|
+ : public DirectoryBackingStore { |
+ public: |
+ DeferredOnDiskDirectoryBackingStore(const std::string& dir_name, |
+ const base::FilePath& backing_filepath); |
+ virtual ~DeferredOnDiskDirectoryBackingStore(); |
+ virtual DirOpenResult Load( |
+ Directory::MetahandlesMap* handles_map, |
+ JournalIndex* delete_journals, |
+ Directory::KernelLoadInfo* kernel_load_info) OVERRIDE; |
+ virtual bool SaveChanges(const Directory::SaveChangesSnapshot& snapshot) |
+ OVERRIDE; |
+ |
+ private: |
+ base::FilePath backing_filepath_; |
+ |
+ // Whether current DB is on disk. |
+ bool db_is_on_disk_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DeferredOnDiskDirectoryBackingStore); |
+}; |
+ |
+} // namespace syncable |
+} // namespace syncer |
+ |
+#endif // SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ |