Chromium Code Reviews| Index: services/preferences/public/interfaces/preferences.mojom |
| diff --git a/services/preferences/public/interfaces/preferences.mojom b/services/preferences/public/interfaces/preferences.mojom |
| index ca3f37ad114dbc41a839434085cde7e2ba5a6492..5a8c0c529d169bab4880296766cb9621756390c7 100644 |
| --- a/services/preferences/public/interfaces/preferences.mojom |
| +++ b/services/preferences/public/interfaces/preferences.mojom |
| @@ -4,8 +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/preferences_configuration.mojom"; |
| +import "services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom"; |
| const string kServiceName = "preferences"; |
| const string kForwarderServiceName = "preferences_forwarder"; |
| @@ -18,6 +20,7 @@ enum PrefStoreType { |
| SUPERVISED_USER, |
| EXTENSION, |
| COMMAND_LINE, |
| + INCOGNITO, |
|
Sam McNally
2017/05/10 01:22:16
Below USER.
Bernhard Bauer
2017/05/11 14:34:33
I thought the idea was that this would be the stor
tibell
2017/05/11 22:44:42
I should probably name this enum value better (UND
Bernhard Bauer
2017/05/12 09:44:30
Right, what I meant was: assuming that the change
|
| USER, |
| RECOMMENDED, |
| DEFAULT, |
| @@ -97,6 +100,9 @@ interface PrefStoreConnector { |
| array<PrefStoreType> already_connected_types) => |
| (PersistentPrefStoreConnection connection, |
| map<PrefStoreType, PrefStoreConnection> connections); |
| + |
| + // Connect to a read-only view of the user pref store. Used for incognito. |
| + ConnectToUserPrefStore(PrefStore& request); |
| }; |
| // An update to a subcomponent of a pref. |
| @@ -155,3 +161,66 @@ interface PrefServiceControl { |
| // be used. |
| Init(PersistentPrefStoreConfiguration configuration); |
| }; |
| + |
| +// --------------------------------------------------------------------- |
| +// Service Configuration |
| + |
| +union PersistentPrefStoreConfiguration { |
| + SimplePersistentPrefStoreConfiguration simple_configuration; |
| + TrackedPersistentPrefStoreConfiguration tracked_configuration; |
| + IncognitoPersistentPrefStoreConfiguration incognito_configuration; |
| +}; |
| + |
| +struct SimplePersistentPrefStoreConfiguration { |
| + mojo.common.mojom.FilePath pref_filename; |
| +}; |
| + |
| +// These parameters are passed to prefs::CreateTrackedPersistentPrefStore() in |
| +// services/preferences/persistent_pref_store_factory.cc. |
| +struct TrackedPersistentPrefStoreConfiguration { |
| + 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; |
| + string registry_seed; |
| + 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; |
| +}; |
| + |
| +interface ResetOnLoadObserver { |
| + OnResetOnLoad(); |
| +}; |
| + |
| +struct IncognitoPersistentPrefStoreConfiguration { |
| + // A connector for the underlying user's prefs. Used to serve that user's |
| + // prefs in a read-only fashion. |
| + PrefStoreConnector connector; |
| +}; |