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 2745563005: Pref service: add support for tracked prefs. (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
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";
8 10
9 union PersistentPrefStoreConfiguration { 11 union PersistentPrefStoreConfiguration {
10 SimplePersistentPrefStoreConfiguration simple_configuration; 12 SimplePersistentPrefStoreConfiguration simple_configuration;
13 TrackedPersistentPrefStoreConfiguration tracked_configuration;
11 }; 14 };
12 15
13 struct SimplePersistentPrefStoreConfiguration { 16 struct SimplePersistentPrefStoreConfiguration {
14 mojo.common.mojom.FilePath pref_filename; 17 mojo.common.mojom.FilePath pref_filename;
15 }; 18 };
19
20 struct TrackedPersistentPrefStoreConfiguration {
tibell 2017/03/10 04:29:01 Could you refer to the C++ function taking all the
Sam McNally 2017/03/10 05:04:44 Done.
21 mojo.common.mojom.FilePath unprotected_pref_filename;
22 mojo.common.mojom.FilePath protected_pref_filename;
23 array<TrackedPreferenceMetadata> tracking_configuration;
24 uint64 reporting_ids_count;
25 string seed;
26 string legacy_device_id;
27 mojo.common.mojom.String16 registry_path;
28 TrackedPreferenceValidationDelegate? validation_delegate;
29 ResetOnLoadObserver? reset_on_load_observer;
30 };
31
32 struct TrackedPreferenceMetadata {
33 enum EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD };
34
35 enum PrefTrackingStrategy {
36 // Atomic preferences are tracked as a whole.
37 ATOMIC,
38 // Split preferences are dictionaries for which each top-level entry is
39 // tracked independently. Note: preferences using this strategy must be kept
40 // in sync with TrackedSplitPreferences in histograms.xml.
41 SPLIT,
42 };
43
44 enum ValueType {
45 IMPERSONAL,
46 // The preference value may contain personal information.
47 PERSONAL,
48 };
49
50 uint64 reporting_id;
51 string name;
52 EnforcementLevel enforcement_level;
53 PrefTrackingStrategy strategy;
54 ValueType value_type;
55 };
56
57 interface ResetOnLoadObserver {
58 OnResetOnLoad();
59 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698