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

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

Issue 668783004: Standardize usage of virtual/override/final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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_store.h ('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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 scoped_refptr<TestingPrefStore> recommended_prefs_; 77 scoped_refptr<TestingPrefStore> recommended_prefs_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceBase); 79 DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceBase);
80 }; 80 };
81 81
82 // Test version of PrefService. 82 // Test version of PrefService.
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 ~TestingPrefServiceSimple() override;
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. PrefServiceFactory). 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);
(...skipping 91 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_value_store.h ('k') | base/prefs/testing_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698