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

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

Issue 2077713002: [USS] Store supports hosting multiple datatypes per database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: can create multiple backend base on path Created 4 years, 6 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/model_type_store_impl.h
diff --git a/sync/internal_api/public/model_type_store_impl.h b/sync/internal_api/public/model_type_store_impl.h
index 20253ef28ab899cf5481d8dae59b02cbf7706289..65e9771acaa159f52451d7fab8bf489ecdb2c2c3 100644
--- a/sync/internal_api/public/model_type_store_impl.h
+++ b/sync/internal_api/public/model_type_store_impl.h
@@ -80,7 +80,7 @@ class ModelTypeStoreImpl : public ModelTypeStore, public base::NonThreadSafe {
ModelTypeStoreImpl(
const syncer::ModelType type,
- std::unique_ptr<ModelTypeStoreBackend> backend,
+ scoped_refptr<ModelTypeStoreBackend> backend,
scoped_refptr<base::SequencedTaskRunner> backend_task_runner);
// Callbacks for different calls to ModelTypeStoreBackend.
@@ -102,15 +102,15 @@ class ModelTypeStoreImpl : public ModelTypeStore, public base::NonThreadSafe {
void WriteModificationsDone(const CallbackWithResult& callback,
Result result);
- // Backend is owned by store, but should be deleted on backend thread. To
- // accomplish this store's dtor posts task to backend thread passing backend
- // ownership to task parameter.
- std::unique_ptr<ModelTypeStoreBackend> backend_;
+ // Backend is useing scoped_refptr, but should be deleted on backend thread.
+ // To accomplish this store's dtor posts task to backend thread passing
+ // backend ownership to task parameter.
+ scoped_refptr<ModelTypeStoreBackend> backend_;
scoped_refptr<base::SequencedTaskRunner> backend_task_runner_;
// Key prefix for data/metadata records of this model type.
- const std::string dataPrefix_;
- const std::string metadataPrefix_;
+ const std::string data_prefix_;
+ const std::string metadata_prefix_;
base::WeakPtrFactory<ModelTypeStoreImpl> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698