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

Unified Diff: services/preferences/public/interfaces/preferences.mojom

Issue 2743563003: Pref service: add persistent pref store frontend and backend. (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « services/preferences/public/cpp/tests/pref_store_client_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/preferences/public/interfaces/preferences.mojom
diff --git a/services/preferences/public/interfaces/preferences.mojom b/services/preferences/public/interfaces/preferences.mojom
index 2f6cfdd584d896c52673255cacae5a94b79b6db7..23a2010e225bbb7b4773630da07ab7781cd39f1c 100644
--- a/services/preferences/public/interfaces/preferences.mojom
+++ b/services/preferences/public/interfaces/preferences.mojom
@@ -91,3 +91,44 @@ interface PrefStoreConnector {
// be received.
Connect() => (map<PrefStoreType, PrefStoreConnection> connections);
};
+
+// An interface providing mutation access to a PersistentPrefStore.
+interface PersistentPrefStore {
+ // Sets the value for |key|. A null |value| indicates a delete. |flags| is a
+ // bitmask of WritablePrefStore::PrefWriteFlags.
+ SetValue(string key, mojo.common.mojom.Value? value, uint32 flags);
+
+ // These mirror the C++ PersistentPrefStore methods.
+ CommitPendingWrite();
+ SchedulePendingLossyWrites();
+ ClearMutableValues();
+};
+
+// A connector that provides a way to connect to a PersistentPrefStore.
+interface PersistentPrefStoreConnector {
+ enum ReadError {
+ NONE = 0,
+ JSON_PARSE = 1,
+ JSON_TYPE = 2,
+ ACCESS_DENIED = 3,
+ FILE_OTHER = 4,
+ FILE_LOCKED = 5,
+ NO_FILE = 6,
+ JSON_REPEAT = 7,
+ // OTHER = 8, // Deprecated.
+ FILE_NOT_SPECIFIED = 9,
+ ASYNCHRONOUS_TASK_INCOMPLETE = 10,
+ };
+
+ // Connects to the PersistentPrefStore.
+ // A null |preferences| indicates that the pref service failed to load prefs.
+ // |pref_store| provides write access; |observer| is used to observe writes
+ // instigated by other clients.
+ [Sync]
+ Connect() => (
+ ReadError read_error,
+ bool read_only,
+ mojo.common.mojom.DictionaryValue? preferences,
+ PersistentPrefStore? pref_store,
+ PrefStoreObserver&? observer);
+};
« no previous file with comments | « services/preferences/public/cpp/tests/pref_store_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698