OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_PREFS_TESTING_PREF_SERVICE_H_ | 5 #ifndef BASE_PREFS_TESTING_PREF_SERVICE_H_ |
6 #define BASE_PREFS_TESTING_PREF_SERVICE_H_ | 6 #define BASE_PREFS_TESTING_PREF_SERVICE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/pref_registry.h" | 10 #include "base/prefs/pref_registry.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const Value* TestingPrefServiceBase< | 112 const Value* TestingPrefServiceBase< |
113 SuperPrefService, ConstructionPrefRegistry>::GetManagedPref( | 113 SuperPrefService, ConstructionPrefRegistry>::GetManagedPref( |
114 const char* path) const { | 114 const char* path) const { |
115 return GetPref(managed_prefs_, path); | 115 return GetPref(managed_prefs_, path); |
116 } | 116 } |
117 | 117 |
118 template<class SuperPrefService, class ConstructionPrefRegistry> | 118 template<class SuperPrefService, class ConstructionPrefRegistry> |
119 void TestingPrefServiceBase< | 119 void TestingPrefServiceBase< |
120 SuperPrefService, ConstructionPrefRegistry>::SetManagedPref( | 120 SuperPrefService, ConstructionPrefRegistry>::SetManagedPref( |
121 const char* path, Value* value) { | 121 const char* path, Value* value) { |
122 SetPref(managed_prefs_, path, value); | 122 SetPref(managed_prefs_.get(), path, value); |
123 } | 123 } |
124 | 124 |
125 template<class SuperPrefService, class ConstructionPrefRegistry> | 125 template<class SuperPrefService, class ConstructionPrefRegistry> |
126 void TestingPrefServiceBase< | 126 void TestingPrefServiceBase< |
127 SuperPrefService, ConstructionPrefRegistry>::RemoveManagedPref( | 127 SuperPrefService, ConstructionPrefRegistry>::RemoveManagedPref( |
128 const char* path) { | 128 const char* path) { |
129 RemovePref(managed_prefs_, path); | 129 RemovePref(managed_prefs_.get(), path); |
130 } | 130 } |
131 | 131 |
132 template<class SuperPrefService, class ConstructionPrefRegistry> | 132 template<class SuperPrefService, class ConstructionPrefRegistry> |
133 const Value* TestingPrefServiceBase< | 133 const Value* TestingPrefServiceBase< |
134 SuperPrefService, ConstructionPrefRegistry>::GetUserPref( | 134 SuperPrefService, ConstructionPrefRegistry>::GetUserPref( |
135 const char* path) const { | 135 const char* path) const { |
136 return GetPref(user_prefs_, path); | 136 return GetPref(user_prefs_, path); |
137 } | 137 } |
138 | 138 |
139 template<class SuperPrefService, class ConstructionPrefRegistry> | 139 template<class SuperPrefService, class ConstructionPrefRegistry> |
140 void TestingPrefServiceBase< | 140 void TestingPrefServiceBase< |
141 SuperPrefService, ConstructionPrefRegistry>::SetUserPref( | 141 SuperPrefService, ConstructionPrefRegistry>::SetUserPref( |
142 const char* path, Value* value) { | 142 const char* path, Value* value) { |
143 SetPref(user_prefs_, path, value); | 143 SetPref(user_prefs_.get(), path, value); |
144 } | 144 } |
145 | 145 |
146 template<class SuperPrefService, class ConstructionPrefRegistry> | 146 template<class SuperPrefService, class ConstructionPrefRegistry> |
147 void TestingPrefServiceBase< | 147 void TestingPrefServiceBase< |
148 SuperPrefService, ConstructionPrefRegistry>::RemoveUserPref( | 148 SuperPrefService, ConstructionPrefRegistry>::RemoveUserPref( |
149 const char* path) { | 149 const char* path) { |
150 RemovePref(user_prefs_, path); | 150 RemovePref(user_prefs_.get(), path); |
151 } | 151 } |
152 | 152 |
153 template<class SuperPrefService, class ConstructionPrefRegistry> | 153 template<class SuperPrefService, class ConstructionPrefRegistry> |
154 const Value* TestingPrefServiceBase< | 154 const Value* TestingPrefServiceBase< |
155 SuperPrefService, ConstructionPrefRegistry>::GetRecommendedPref( | 155 SuperPrefService, ConstructionPrefRegistry>::GetRecommendedPref( |
156 const char* path) const { | 156 const char* path) const { |
157 return GetPref(recommended_prefs_, path); | 157 return GetPref(recommended_prefs_, path); |
158 } | 158 } |
159 | 159 |
160 template<class SuperPrefService, class ConstructionPrefRegistry> | 160 template<class SuperPrefService, class ConstructionPrefRegistry> |
161 void TestingPrefServiceBase< | 161 void TestingPrefServiceBase< |
162 SuperPrefService, ConstructionPrefRegistry>::SetRecommendedPref( | 162 SuperPrefService, ConstructionPrefRegistry>::SetRecommendedPref( |
163 const char* path, Value* value) { | 163 const char* path, Value* value) { |
164 SetPref(recommended_prefs_, path, value); | 164 SetPref(recommended_prefs_.get(), path, value); |
165 } | 165 } |
166 | 166 |
167 template<class SuperPrefService, class ConstructionPrefRegistry> | 167 template<class SuperPrefService, class ConstructionPrefRegistry> |
168 void TestingPrefServiceBase< | 168 void TestingPrefServiceBase< |
169 SuperPrefService, ConstructionPrefRegistry>::RemoveRecommendedPref( | 169 SuperPrefService, ConstructionPrefRegistry>::RemoveRecommendedPref( |
170 const char* path) { | 170 const char* path) { |
171 RemovePref(recommended_prefs_, path); | 171 RemovePref(recommended_prefs_, path); |
172 } | 172 } |
173 | 173 |
174 template<class SuperPrefService, class ConstructionPrefRegistry> | 174 template<class SuperPrefService, class ConstructionPrefRegistry> |
(...skipping 12 matching lines...) Expand all Loading... |
187 } | 187 } |
188 | 188 |
189 template<class SuperPrefService, class ConstructionPrefRegistry> | 189 template<class SuperPrefService, class ConstructionPrefRegistry> |
190 void TestingPrefServiceBase< | 190 void TestingPrefServiceBase< |
191 SuperPrefService, ConstructionPrefRegistry>::RemovePref( | 191 SuperPrefService, ConstructionPrefRegistry>::RemovePref( |
192 TestingPrefStore* pref_store, const char* path) { | 192 TestingPrefStore* pref_store, const char* path) { |
193 pref_store->RemoveValue(path); | 193 pref_store->RemoveValue(path); |
194 } | 194 } |
195 | 195 |
196 #endif // BASE_PREFS_TESTING_PREF_SERVICE_H_ | 196 #endif // BASE_PREFS_TESTING_PREF_SERVICE_H_ |
OLD | NEW |