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

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

Issue 2635093002: Switch Preferences to use Factory (Closed)
Patch Set: Missed test Created 3 years, 11 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_observer_store_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 27d43d3192d6a3e937691b32a20856bbfd653eb1..cae6a15f56306fda0c5ef0e4b3f9adb3a83417f2 100644
--- a/services/preferences/public/interfaces/preferences.mojom
+++ b/services/preferences/public/interfaces/preferences.mojom
@@ -8,6 +8,13 @@ import "mojo/common/values.mojom";
const string kServiceName = "preferences";
+// Used for the creation of a PreferencesManager and to ensure that the
+// PreferencesObserver is bound at creation time.
+interface PreferencesFactory {
+ // Creates a PreferencesManager bound to the provided |observer|.
+ Create(PreferencesObserver observer, PreferencesManager& manager);
Ben Goodger (Google) 2017/01/19 18:56:54 fwiw, now that you've enforced a more strict 1:1 m
jonross 2017/01/19 19:07:05 I was planning for a rename in a follow up. I'll
+};
+
// Used to subscribe to preference changes within PreferenceManager. After
// requesting to observe, the current values for all requested keys are sent.
interface PreferencesObserver {
@@ -17,7 +24,6 @@ interface PreferencesObserver {
// Manages actual read/write of preference data. Accepts observers who subscribe
// to preferences, notifying them of changes.
interface PreferencesManager {
- AddObserver(PreferencesObserver client);
SetPreferences(mojo.common.mojom.DictionaryValue preferences);
Subscribe(array<string> preferences);
};
« no previous file with comments | « services/preferences/public/cpp/tests/pref_observer_store_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698