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

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

Issue 2722483005: Change configuration of user prefs to use mojo. (Closed)
Patch Set: 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/user_prefs_impl.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 f3e140956b3e4c8788718fc2af0cc2ae3855cad2..fe32adc3a067f165abbde0eef97e9383718c8f55 100644
--- a/services/preferences/public/interfaces/preferences.mojom
+++ b/services/preferences/public/interfaces/preferences.mojom
@@ -4,7 +4,10 @@
module prefs.mojom;
+import "mojo/common/file_path.mojom";
+import "mojo/common/string16.mojom";
import "mojo/common/values.mojom";
+import "services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom";
const string kServiceName = "preferences";
@@ -58,3 +61,57 @@ interface PersistentPrefStoreConnector {
mojo.common.mojom.DictionaryValue? preferences,
PersistentPrefStore? pref_store);
};
+
+interface ResetOnLoadObserver {
+ OnResetOnLoad();
+};
+
+interface PersistentPrefStoreInit {
+ Init(UserPrefsConfiguration configuration);
+};
+
+union UserPrefsConfiguration {
+ SimpleUserPrefsConfiguration simple_configuration;
+ SegregatedUserPrefsConfiguration segregated_configuration;
+};
+
+struct SimpleUserPrefsConfiguration {
+ mojo.common.mojom.FilePath pref_filename;
+};
+
+struct SegregatedUserPrefsConfiguration {
+ mojo.common.mojom.FilePath unprotected_pref_filename;
+ mojo.common.mojom.FilePath protected_pref_filename;
+ array<TrackedPreferenceMetadata> tracking_configuration;
+ uint64 reporting_ids_count;
+ string seed;
+ string legacy_device_id;
+ mojo.common.mojom.String16 registry_path;
+ TrackedPreferenceValidationDelegate? validation_delegate;
+ ResetOnLoadObserver reset_on_load_observer;
+};
+
+struct TrackedPreferenceMetadata {
+ enum EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD };
+
+ enum PrefTrackingStrategy {
+ // Atomic preferences are tracked as a whole.
+ ATOMIC,
+ // Split preferences are dictionaries for which each top-level entry is
+ // tracked independently. Note: preferences using this strategy must be kept
+ // in sync with TrackedSplitPreferences in histograms.xml.
+ SPLIT,
+ };
+
+ enum ValueType {
+ IMPERSONAL,
+ // The preference value may contain personal information.
+ PERSONAL,
+ };
+
+ uint64 reporting_id;
+ string name;
+ EnforcementLevel enforcement_level;
+ PrefTrackingStrategy strategy;
+ ValueType value_type;
+};
« no previous file with comments | « services/preferences/public/cpp/user_prefs_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698