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

Unified Diff: services/preferences/public/cpp/persistent_pref_store_client.h

Issue 2791893002: Pref service: Batch pref updates. (Closed)
Patch Set: rebase Created 3 years, 8 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: services/preferences/public/cpp/persistent_pref_store_client.h
diff --git a/services/preferences/public/cpp/persistent_pref_store_client.h b/services/preferences/public/cpp/persistent_pref_store_client.h
index 6ed2b1164d71e2d3ea4896648d1b79d822779db3..e317ec9f163d54c39e6d7757ee14ca9249a00c1f 100644
--- a/services/preferences/public/cpp/persistent_pref_store_client.h
+++ b/services/preferences/public/cpp/persistent_pref_store_client.h
@@ -66,15 +66,21 @@ class PersistentPrefStoreClient
prefs::mojom::PrefStoreConnectionPtr>
other_pref_stores);
+ void QueueWrite(const std::string& key, uint32_t flags);
+ void FlushPendingWrites();
+
mojom::PrefStoreConnectorPtr connector_;
scoped_refptr<PrefRegistry> pref_registry_;
bool read_only_ = false;
PrefReadError read_error_ = PersistentPrefStore::PREF_READ_ERROR_NONE;
mojom::PersistentPrefStorePtr pref_store_;
+ std::map<std::string, uint32_t> pending_writes_;
std::unique_ptr<ReadErrorDelegate> error_delegate_;
std::vector<PrefValueStore::PrefStoreType> already_connected_types_;
+ base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreClient);
};
« no previous file with comments | « services/preferences/persistent_pref_store_impl.cc ('k') | services/preferences/public/cpp/persistent_pref_store_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698