| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_USER_PREFS_TRACKED_ATOMIC_PREFERENCE_H_ | 5 #ifndef COMPONENTS_USER_PREFS_TRACKED_ATOMIC_PREFERENCE_H_ |
| 6 #define COMPONENTS_USER_PREFS_TRACKED_ATOMIC_PREFERENCE_H_ | 6 #define COMPONENTS_USER_PREFS_TRACKED_ATOMIC_PREFERENCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class TrackedAtomicPreference : public TrackedPreference { | 23 class TrackedAtomicPreference : public TrackedPreference { |
| 24 public: | 24 public: |
| 25 TrackedAtomicPreference(const std::string& pref_path, | 25 TrackedAtomicPreference(const std::string& pref_path, |
| 26 size_t reporting_id, | 26 size_t reporting_id, |
| 27 size_t reporting_ids_count, | 27 size_t reporting_ids_count, |
| 28 PrefHashFilter::EnforcementLevel enforcement_level, | 28 PrefHashFilter::EnforcementLevel enforcement_level, |
| 29 PrefHashFilter::ValueType value_type, | 29 PrefHashFilter::ValueType value_type, |
| 30 TrackedPreferenceValidationDelegate* delegate); | 30 TrackedPreferenceValidationDelegate* delegate); |
| 31 | 31 |
| 32 // TrackedPreference implementation. | 32 // TrackedPreference implementation. |
| 33 TrackedPreferenceType GetType() const override; |
| 33 void OnNewValue(const base::Value* value, | 34 void OnNewValue(const base::Value* value, |
| 34 PrefHashStoreTransaction* transaction) const override; | 35 PrefHashStoreTransaction* transaction) const override; |
| 35 bool EnforceAndReport(base::DictionaryValue* pref_store_contents, | 36 bool EnforceAndReport( |
| 36 PrefHashStoreTransaction* transaction) const override; | 37 base::DictionaryValue* pref_store_contents, |
| 38 PrefHashStoreTransaction* transaction, |
| 39 PrefHashStoreTransaction* external_validation_transaction) const override; |
| 37 | 40 |
| 38 private: | 41 private: |
| 39 const std::string pref_path_; | 42 const std::string pref_path_; |
| 40 const TrackedPreferenceHelper helper_; | 43 const TrackedPreferenceHelper helper_; |
| 41 TrackedPreferenceValidationDelegate* delegate_; | 44 TrackedPreferenceValidationDelegate* delegate_; |
| 42 | 45 |
| 43 DISALLOW_COPY_AND_ASSIGN(TrackedAtomicPreference); | 46 DISALLOW_COPY_AND_ASSIGN(TrackedAtomicPreference); |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 #endif // COMPONENTS_USER_PREFS_TRACKED_ATOMIC_PREFERENCE_H_ | 49 #endif // COMPONENTS_USER_PREFS_TRACKED_ATOMIC_PREFERENCE_H_ |
| OLD | NEW |