| 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 CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ | 6 #define CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 PrefHashStoreTransaction::ValueState value_state) const; | 45 PrefHashStoreTransaction::ValueState value_state) const; |
| 46 | 46 |
| 47 // Returns the event for the preference with a given path. | 47 // Returns the event for the preference with a given path. |
| 48 const ValidationEvent* GetEventForPath(const std::string& pref_path) const; | 48 const ValidationEvent* GetEventForPath(const std::string& pref_path) const; |
| 49 | 49 |
| 50 // TrackedPreferenceValidationDelegate implementation. | 50 // TrackedPreferenceValidationDelegate implementation. |
| 51 virtual void OnAtomicPreferenceValidation( | 51 virtual void OnAtomicPreferenceValidation( |
| 52 const std::string& pref_path, | 52 const std::string& pref_path, |
| 53 const base::Value* value, | 53 const base::Value* value, |
| 54 PrefHashStoreTransaction::ValueState value_state, | 54 PrefHashStoreTransaction::ValueState value_state, |
| 55 TrackedPreferenceHelper::ResetAction reset_action) OVERRIDE; | 55 TrackedPreferenceHelper::ResetAction reset_action) override; |
| 56 virtual void OnSplitPreferenceValidation( | 56 virtual void OnSplitPreferenceValidation( |
| 57 const std::string& pref_path, | 57 const std::string& pref_path, |
| 58 const base::DictionaryValue* dict_value, | 58 const base::DictionaryValue* dict_value, |
| 59 const std::vector<std::string>& invalid_keys, | 59 const std::vector<std::string>& invalid_keys, |
| 60 PrefHashStoreTransaction::ValueState value_state, | 60 PrefHashStoreTransaction::ValueState value_state, |
| 61 TrackedPreferenceHelper::ResetAction reset_action) OVERRIDE; | 61 TrackedPreferenceHelper::ResetAction reset_action) override; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Adds a new validation event. | 64 // Adds a new validation event. |
| 65 void RecordValidation(const std::string& pref_path, | 65 void RecordValidation(const std::string& pref_path, |
| 66 PrefHashStoreTransaction::ValueState value_state, | 66 PrefHashStoreTransaction::ValueState value_state, |
| 67 TrackedPreferenceHelper::ResetAction reset_action, | 67 TrackedPreferenceHelper::ResetAction reset_action, |
| 68 PrefHashFilter::PrefTrackingStrategy strategy); | 68 PrefHashFilter::PrefTrackingStrategy strategy); |
| 69 | 69 |
| 70 std::vector<ValidationEvent> validations_; | 70 std::vector<ValidationEvent> validations_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(MockValidationDelegate); | 72 DISALLOW_COPY_AND_ASSIGN(MockValidationDelegate); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ | 75 #endif // CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ |
| OLD | NEW |