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

Side by Side Diff: services/preferences/public/interfaces/preferences_configuration.mojom

Issue 2799043003: Revert of Pref service: add support for tracked prefs. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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"; 7 import "mojo/common/file_path.mojom";
8 import "mojo/common/string16.mojom";
9 import "services/preferences/public/interfaces/tracked_preference_validation_del egate.mojom";
10 8
11 union PersistentPrefStoreConfiguration { 9 union PersistentPrefStoreConfiguration {
12 SimplePersistentPrefStoreConfiguration simple_configuration; 10 SimplePersistentPrefStoreConfiguration simple_configuration;
13 TrackedPersistentPrefStoreConfiguration tracked_configuration;
14 }; 11 };
15 12
16 struct SimplePersistentPrefStoreConfiguration { 13 struct SimplePersistentPrefStoreConfiguration {
17 mojo.common.mojom.FilePath pref_filename; 14 mojo.common.mojom.FilePath pref_filename;
18 }; 15 };
19 16
20 // These parameters are passed to prefs::CreateTrackedPersistentPrefStore() in
21 // services/preferences/persistent_pref_store_factory.cc.
22 struct TrackedPersistentPrefStoreConfiguration {
23 mojo.common.mojom.FilePath unprotected_pref_filename;
24 mojo.common.mojom.FilePath protected_pref_filename;
25 array<TrackedPreferenceMetadata> tracking_configuration;
26 uint64 reporting_ids_count;
27 string seed;
28 string legacy_device_id;
29 string registry_seed;
30 mojo.common.mojom.String16 registry_path;
31 TrackedPreferenceValidationDelegate? validation_delegate;
32 ResetOnLoadObserver? reset_on_load_observer;
33 };
34
35 struct TrackedPreferenceMetadata { 17 struct TrackedPreferenceMetadata {
36 enum EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD }; 18 enum EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD };
37 19
38 enum PrefTrackingStrategy { 20 enum PrefTrackingStrategy {
39 // Atomic preferences are tracked as a whole. 21 // Atomic preferences are tracked as a whole.
40 ATOMIC, 22 ATOMIC,
41 // Split preferences are dictionaries for which each top-level entry is 23 // Split preferences are dictionaries for which each top-level entry is
42 // tracked independently. Note: preferences using this strategy must be kept 24 // tracked independently. Note: preferences using this strategy must be kept
43 // in sync with TrackedSplitPreferences in histograms.xml. 25 // in sync with TrackedSplitPreferences in histograms.xml.
44 SPLIT, 26 SPLIT,
45 }; 27 };
46 28
47 enum ValueType { 29 enum ValueType {
48 IMPERSONAL, 30 IMPERSONAL,
49 // The preference value may contain personal information. 31 // The preference value may contain personal information.
50 PERSONAL, 32 PERSONAL,
51 }; 33 };
52 34
53 uint64 reporting_id; 35 uint64 reporting_id;
54 string name; 36 string name;
55 EnforcementLevel enforcement_level; 37 EnforcementLevel enforcement_level;
56 PrefTrackingStrategy strategy; 38 PrefTrackingStrategy strategy;
57 ValueType value_type; 39 ValueType value_type;
58 }; 40 };
59
60 interface ResetOnLoadObserver {
61 OnResetOnLoad();
62 };
OLDNEW
« no previous file with comments | « services/preferences/persistent_pref_store_impl_unittest.cc ('k') | services/preferences/tracked/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698