Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: sync/internal_api/public/internal_components_factory.h

Issue 455023003: Let SyncBackupManager keep backup data in memory until shutdown. Only persist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix sync manager test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/public/internal_components_factory.h
diff --git a/sync/internal_api/public/internal_components_factory.h b/sync/internal_api/public/internal_components_factory.h
index f43804ac4d6aecef6398b5912b9ce0160468315c..f077af006a33b7e026d78d59548f889061d0d58e 100644
--- a/sync/internal_api/public/internal_components_factory.h
+++ b/sync/internal_api/public/internal_components_factory.h
@@ -72,6 +72,21 @@ class SYNC_EXPORT InternalComponentsFactory {
PreCommitUpdatesPolicy pre_commit_updates_policy;
};
+ // For selecting the types of storage to use to persist sync data when
+ // BuildDirectoryBackingStore() is called.
+ enum StorageOption {
+ // BuildDirectoryBackingStore should not use persistent on-disk storage.
+ STORAGE_IN_MEMORY,
+ // Use this if you want BuildDirectoryBackingStore to create/use a real
+ // on disk store.
+ STORAGE_ON_DISK,
+ // Use this to defer creating on-disk database until
+ // DirectoryBackingStore::SaveChanges() is called.
+ STORAGE_ON_DISK_DEFERRED,
+ // Use this to test the case where a directory fails to load.
+ STORAGE_INVALID
+ };
+
virtual ~InternalComponentsFactory() {}
virtual scoped_ptr<SyncScheduler> BuildScheduler(
@@ -90,6 +105,7 @@ class SYNC_EXPORT InternalComponentsFactory {
virtual scoped_ptr<syncable::DirectoryBackingStore>
BuildDirectoryBackingStore(
+ StorageOption storage,
const std::string& dir_name,
const base::FilePath& backing_filepath) = 0;
« no previous file with comments | « sync/internal_api/internal_components_factory_impl.cc ('k') | sync/internal_api/public/internal_components_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698