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

Side by Side Diff: base/prefs/testing_pref_service.h

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « base/prefs/pref_value_map_unittest.cc ('k') | base/prefs/testing_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const std::string& path) const { 175 const std::string& path) const {
176 const base::Value* res; 176 const base::Value* res;
177 return pref_store->GetValue(path, &res) ? res : NULL; 177 return pref_store->GetValue(path, &res) ? res : NULL;
178 } 178 }
179 179
180 template <class SuperPrefService, class ConstructionPrefRegistry> 180 template <class SuperPrefService, class ConstructionPrefRegistry>
181 void TestingPrefServiceBase<SuperPrefService, ConstructionPrefRegistry>:: 181 void TestingPrefServiceBase<SuperPrefService, ConstructionPrefRegistry>::
182 SetPref(TestingPrefStore* pref_store, 182 SetPref(TestingPrefStore* pref_store,
183 const std::string& path, 183 const std::string& path,
184 base::Value* value) { 184 base::Value* value) {
185 pref_store->SetValue(path, value, 185 pref_store->SetValue(path, make_scoped_ptr(value),
186 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 186 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
187 } 187 }
188 188
189 template <class SuperPrefService, class ConstructionPrefRegistry> 189 template <class SuperPrefService, class ConstructionPrefRegistry>
190 void TestingPrefServiceBase<SuperPrefService, ConstructionPrefRegistry>:: 190 void TestingPrefServiceBase<SuperPrefService, ConstructionPrefRegistry>::
191 RemovePref(TestingPrefStore* pref_store, const std::string& path) { 191 RemovePref(TestingPrefStore* pref_store, const std::string& path) {
192 pref_store->RemoveValue(path, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 192 pref_store->RemoveValue(path, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
193 } 193 }
194 194
195 #endif // BASE_PREFS_TESTING_PREF_SERVICE_H_ 195 #endif // BASE_PREFS_TESTING_PREF_SERVICE_H_
OLDNEW
« no previous file with comments | « base/prefs/pref_value_map_unittest.cc ('k') | base/prefs/testing_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698