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

Unified Diff: components/user_prefs/tracked/pref_hash_filter.h

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 side-by-side diff with in-line comments
Download patch
Index: components/user_prefs/tracked/pref_hash_filter.h
diff --git a/components/user_prefs/tracked/pref_hash_filter.h b/components/user_prefs/tracked/pref_hash_filter.h
index d7addb9ee18709df9b28c613d47575c087ef5a68..5e19e96777a0b63a6af80159372180dabfdabfd9 100644
--- a/components/user_prefs/tracked/pref_hash_filter.h
+++ b/components/user_prefs/tracked/pref_hash_filter.h
@@ -21,6 +21,7 @@
#include "components/user_prefs/tracked/hash_store_contents.h"
#include "components/user_prefs/tracked/interceptable_pref_filter.h"
#include "components/user_prefs/tracked/tracked_preference.h"
+#include "services/preferences/public/interfaces/preferences_configuration.mojom-shared.h"
class PrefHashStore;
class PrefService;
@@ -45,22 +46,11 @@ class PrefRegistrySyncable;
// are changed.
class PrefHashFilter : public InterceptablePrefFilter {
public:
- enum class EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD };
-
- enum class 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 class ValueType {
- IMPERSONAL,
- // The preference value may contain personal information.
- PERSONAL,
- };
+ using EnforcementLevel =
+ prefs::mojom::TrackedPreferenceMetadata_EnforcementLevel;
+ using PrefTrackingStrategy =
+ prefs::mojom::TrackedPreferenceMetadata_PrefTrackingStrategy;
+ using ValueType = prefs::mojom::TrackedPreferenceMetadata_ValueType;
struct TrackedPreferenceMetadata {
size_t reporting_id;

Powered by Google App Engine
This is Rietveld 408576698