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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « services/preferences/public/cpp/user_prefs_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module prefs.mojom; 5 module prefs.mojom;
6 6
7 import "mojo/common/file_path.mojom";
8 import "mojo/common/string16.mojom";
7 import "mojo/common/values.mojom"; 9 import "mojo/common/values.mojom";
10 import "services/preferences/public/interfaces/tracked_preference_validation_del egate.mojom";
8 11
9 const string kServiceName = "preferences"; 12 const string kServiceName = "preferences";
10 13
11 // Used for the creation of a PreferencesService and to ensure that the 14 // Used for the creation of a PreferencesService and to ensure that the
12 // PreferencesServiceClient is bound at creation time. 15 // PreferencesServiceClient is bound at creation time.
13 interface PreferencesServiceFactory { 16 interface PreferencesServiceFactory {
14 // Creates a PreferencesService bound to the provided |observer|. 17 // Creates a PreferencesService bound to the provided |observer|.
15 Create(PreferencesServiceClient observer, PreferencesService& service); 18 Create(PreferencesServiceClient observer, PreferencesService& service);
16 }; 19 };
17 20
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ASYNCHRONOUS_TASK_INCOMPLETE = 10, 54 ASYNCHRONOUS_TASK_INCOMPLETE = 10,
52 }; 55 };
53 56
54 [Sync] 57 [Sync]
55 Connect() => ( 58 Connect() => (
56 ReadError read_error, 59 ReadError read_error,
57 bool read_only, 60 bool read_only,
58 mojo.common.mojom.DictionaryValue? preferences, 61 mojo.common.mojom.DictionaryValue? preferences,
59 PersistentPrefStore? pref_store); 62 PersistentPrefStore? pref_store);
60 }; 63 };
64
65 interface ResetOnLoadObserver {
66 OnResetOnLoad();
67 };
68
69 interface PersistentPrefStoreInit {
70 Init(UserPrefsConfiguration configuration);
71 };
72
73 union UserPrefsConfiguration {
74 SimpleUserPrefsConfiguration simple_configuration;
75 SegregatedUserPrefsConfiguration segregated_configuration;
76 };
77
78 struct SimpleUserPrefsConfiguration {
79 mojo.common.mojom.FilePath pref_filename;
80 };
81
82 struct SegregatedUserPrefsConfiguration {
83 mojo.common.mojom.FilePath unprotected_pref_filename;
84 mojo.common.mojom.FilePath protected_pref_filename;
85 array<TrackedPreferenceMetadata> tracking_configuration;
86 uint64 reporting_ids_count;
87 string seed;
88 string legacy_device_id;
89 mojo.common.mojom.String16 registry_path;
90 TrackedPreferenceValidationDelegate? validation_delegate;
91 ResetOnLoadObserver reset_on_load_observer;
92 };
93
94 struct TrackedPreferenceMetadata {
95 enum EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD };
96
97 enum PrefTrackingStrategy {
98 // Atomic preferences are tracked as a whole.
99 ATOMIC,
100 // Split preferences are dictionaries for which each top-level entry is
101 // tracked independently. Note: preferences using this strategy must be kept
102 // in sync with TrackedSplitPreferences in histograms.xml.
103 SPLIT,
104 };
105
106 enum ValueType {
107 IMPERSONAL,
108 // The preference value may contain personal information.
109 PERSONAL,
110 };
111
112 uint64 reporting_id;
113 string name;
114 EnforcementLevel enforcement_level;
115 PrefTrackingStrategy strategy;
116 ValueType value_type;
117 };
OLDNEW
« 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