| Index: services/preferences/tracked/pref_hash_filter.h
|
| diff --git a/components/user_prefs/tracked/pref_hash_filter.h b/services/preferences/tracked/pref_hash_filter.h
|
| similarity index 78%
|
| rename from components/user_prefs/tracked/pref_hash_filter.h
|
| rename to services/preferences/tracked/pref_hash_filter.h
|
| index 1489bc6f6f26e54e82d8798f2fb22afe5a6f3361..7cc2fac889350e8bd0b6c9b8a904dbdfe820a8f6 100644
|
| --- a/components/user_prefs/tracked/pref_hash_filter.h
|
| +++ b/services/preferences/tracked/pref_hash_filter.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_FILTER_H_
|
| -#define COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_FILTER_H_
|
| +#ifndef SERVICES_PREFERENCES_TRACKED_PREF_HASH_FILTER_H_
|
| +#define SERVICES_PREFERENCES_TRACKED_PREF_HASH_FILTER_H_
|
|
|
| #include <stddef.h>
|
|
|
| @@ -18,9 +18,10 @@
|
| #include "base/files/file_path.h"
|
| #include "base/macros.h"
|
| #include "base/optional.h"
|
| -#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.h"
|
| +#include "services/preferences/tracked/hash_store_contents.h"
|
| +#include "services/preferences/tracked/interceptable_pref_filter.h"
|
| +#include "services/preferences/tracked/tracked_preference.h"
|
|
|
| class PrefHashStore;
|
| class PrefService;
|
| @@ -45,31 +46,6 @@ 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,
|
| - };
|
| -
|
| - struct TrackedPreferenceMetadata {
|
| - size_t reporting_id;
|
| - const char* name;
|
| - EnforcementLevel enforcement_level;
|
| - PrefTrackingStrategy strategy;
|
| - ValueType value_type;
|
| - };
|
| -
|
| using StoreContentsPair = std::pair<std::unique_ptr<PrefHashStore>,
|
| std::unique_ptr<HashStoreContents>>;
|
|
|
| @@ -84,14 +60,14 @@ class PrefHashFilter : public InterceptablePrefFilter {
|
| // FinalizeFilterOnLoad.
|
| // |external_validation_hash_store_pair_| will be used (if non-null) to
|
| // perform extra validations without triggering resets.
|
| - PrefHashFilter(
|
| - std::unique_ptr<PrefHashStore> pref_hash_store,
|
| - StoreContentsPair external_validation_hash_store_pair_,
|
| - const std::vector<TrackedPreferenceMetadata>& tracked_preferences,
|
| - const base::Closure& on_reset_on_load,
|
| - prefs::mojom::TrackedPreferenceValidationDelegate* delegate,
|
| - size_t reporting_ids_count,
|
| - bool report_super_mac_validity);
|
| + PrefHashFilter(std::unique_ptr<PrefHashStore> pref_hash_store,
|
| + StoreContentsPair external_validation_hash_store_pair_,
|
| + const std::vector<prefs::mojom::TrackedPreferenceMetadataPtr>&
|
| + tracked_preferences,
|
| + const base::Closure& on_reset_on_load,
|
| + prefs::mojom::TrackedPreferenceValidationDelegate* delegate,
|
| + size_t reporting_ids_count,
|
| + bool report_super_mac_validity);
|
|
|
| ~PrefHashFilter() override;
|
|
|
| @@ -178,4 +154,4 @@ class PrefHashFilter : public InterceptablePrefFilter {
|
| DISALLOW_COPY_AND_ASSIGN(PrefHashFilter);
|
| };
|
|
|
| -#endif // COMPONENTS_PREFS_TRACKED_PREF_HASH_FILTER_H_
|
| +#endif // SERVICES_PREFERENCES_TRACKED_PREF_HASH_FILTER_H_
|
|
|