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

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

Issue 2601873002: Add a mojo bridge for PersistentPrefStore. (Closed)
Patch Set: Created 3 years, 10 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/interfaces/preferences.mojom
diff --git a/services/preferences/public/interfaces/preferences.mojom b/services/preferences/public/interfaces/preferences.mojom
index 1978e4b671fc5a85ccbd004317b7e515bffa0d90..94455a1c00040115a37d610a66de7b62e2a619ce 100644
--- a/services/preferences/public/interfaces/preferences.mojom
+++ b/services/preferences/public/interfaces/preferences.mojom
@@ -27,3 +27,35 @@ interface PreferencesService {
SetPreferences(mojo.common.mojom.DictionaryValue preferences);
Subscribe(array<string> preferences);
};
+
+interface PersistentPrefStore {
+ SetValue(string key, mojo.common.mojom.Value value, uint32 flags);
+ RemoveValue(string key, uint32 flags);
+
+ CommitPendingWrite();
+ SchedulePendingLossyWrites();
+ ClearMutableValues();
+};
+
+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,
+ };
+
+ [Sync]
+ Connect() => (
+ ReadError read_error,
+ bool read_only,
+ mojo.common.mojom.DictionaryValue? preferences,
+ PersistentPrefStore? pref_store);
+};

Powered by Google App Engine
This is Rietveld 408576698