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

Side by Side Diff: components/user_prefs/tracked/mock_validation_delegate.h

Issue 1227973003: Componentize //chrome/browser/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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 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 COMPONENTS_USER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_
6 #define CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ 6 #define COMPONENTS_USER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "chrome/browser/prefs/tracked/pref_hash_filter.h" 13 #include "components/user_prefs/tracked/pref_hash_filter.h"
14 #include "chrome/browser/prefs/tracked/pref_hash_store_transaction.h" 14 #include "components/user_prefs/tracked/pref_hash_store_transaction.h"
15 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h" 15 #include "components/user_prefs/tracked/tracked_preference_validation_delegate.h "
16 16
17 // A mock tracked preference validation delegate for use by tests. 17 // A mock tracked preference validation delegate for use by tests.
18 class MockValidationDelegate : public TrackedPreferenceValidationDelegate { 18 class MockValidationDelegate : public TrackedPreferenceValidationDelegate {
19 public: 19 public:
20 struct ValidationEvent { 20 struct ValidationEvent {
21 ValidationEvent(const std::string& path, 21 ValidationEvent(const std::string& path,
22 PrefHashStoreTransaction::ValueState state, 22 PrefHashStoreTransaction::ValueState state,
23 bool is_personal, 23 bool is_personal,
24 PrefHashFilter::PrefTrackingStrategy tracking_strategy) 24 PrefHashFilter::PrefTrackingStrategy tracking_strategy)
25 : pref_path(path), 25 : pref_path(path),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void RecordValidation(const std::string& pref_path, 64 void RecordValidation(const std::string& pref_path,
65 PrefHashStoreTransaction::ValueState value_state, 65 PrefHashStoreTransaction::ValueState value_state,
66 bool is_personal, 66 bool is_personal,
67 PrefHashFilter::PrefTrackingStrategy strategy); 67 PrefHashFilter::PrefTrackingStrategy strategy);
68 68
69 std::vector<ValidationEvent> validations_; 69 std::vector<ValidationEvent> validations_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(MockValidationDelegate); 71 DISALLOW_COPY_AND_ASSIGN(MockValidationDelegate);
72 }; 72 };
73 73
74 #endif // CHROME_BROWSER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_ 74 #endif // COMPONENTS_USER_PREFS_TRACKED_MOCK_VALIDATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/user_prefs/tracked/interceptable_pref_filter.cc ('k') | components/user_prefs/tracked/mock_validation_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698