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

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

Issue 64193003: Clean up PrefServiceBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory ownership bug in ProxyPolicyTest Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/prefs/pref_service_factory.cc ('k') | chrome/browser/browser_process_impl.cc » ('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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 class TestingPrefServiceSimple 83 class TestingPrefServiceSimple
84 : public TestingPrefServiceBase<PrefService, PrefRegistry> { 84 : public TestingPrefServiceBase<PrefService, PrefRegistry> {
85 public: 85 public:
86 TestingPrefServiceSimple(); 86 TestingPrefServiceSimple();
87 virtual ~TestingPrefServiceSimple(); 87 virtual ~TestingPrefServiceSimple();
88 88
89 // This is provided as a convenience for registering preferences on 89 // This is provided as a convenience for registering preferences on
90 // an existing TestingPrefServiceSimple instance. On a production 90 // an existing TestingPrefServiceSimple instance. On a production
91 // PrefService you would do all registrations before constructing 91 // PrefService you would do all registrations before constructing
92 // it, passing it a PrefRegistry via its constructor (or via 92 // it, passing it a PrefRegistry via its constructor (or via
93 // e.g. PrefServiceBuilder). 93 // e.g. PrefServiceFactory).
94 PrefRegistrySimple* registry(); 94 PrefRegistrySimple* registry();
95 95
96 private: 96 private:
97 DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSimple); 97 DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSimple);
98 }; 98 };
99 99
100 template<> 100 template<>
101 TestingPrefServiceBase<PrefService, PrefRegistry>::TestingPrefServiceBase( 101 TestingPrefServiceBase<PrefService, PrefRegistry>::TestingPrefServiceBase(
102 TestingPrefStore* managed_prefs, 102 TestingPrefStore* managed_prefs,
103 TestingPrefStore* user_prefs, 103 TestingPrefStore* user_prefs,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 template<class SuperPrefService, class ConstructionPrefRegistry> 191 template<class SuperPrefService, class ConstructionPrefRegistry>
192 void TestingPrefServiceBase< 192 void TestingPrefServiceBase<
193 SuperPrefService, ConstructionPrefRegistry>::RemovePref( 193 SuperPrefService, ConstructionPrefRegistry>::RemovePref(
194 TestingPrefStore* pref_store, const char* path) { 194 TestingPrefStore* pref_store, const char* path) {
195 pref_store->RemoveValue(path); 195 pref_store->RemoveValue(path);
196 } 196 }
197 197
198 #endif // BASE_PREFS_TESTING_PREF_SERVICE_H_ 198 #endif // BASE_PREFS_TESTING_PREF_SERVICE_H_
OLDNEW
« no previous file with comments | « base/prefs/pref_service_factory.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698