| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TEST_TESTING_PREF_SERVICE_H_ | 5 #ifndef CHROME_TEST_TESTING_PREF_SERVICE_H_ |
| 6 #define CHROME_TEST_TESTING_PREF_SERVICE_H_ | 6 #define CHROME_TEST_TESTING_PREF_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 | 10 |
| 11 class PrefStore; | 11 class PrefStore; |
| 12 | 12 |
| 13 // A PrefService subclass for testing. It operates totally in memory and | 13 // A PrefService subclass for testing. It operates totally in memory and |
| 14 // provides additional API for manipulating preferences at the different levels | 14 // provides additional API for manipulating preferences at the different levels |
| 15 // (managed, extension, user) conveniently. | 15 // (managed, extension, user) conveniently. |
| 16 class TestingPrefService : public PrefService { | 16 class TestingPrefService : public PrefService { |
| 17 public: | 17 public: |
| 18 // Subclass to allow directly setting PrefStores. | 18 // Subclass to allow directly setting PrefStores. |
| 19 class TestingPrefValueStore : public PrefValueStore { | 19 class TestingPrefValueStore : public PrefValueStore { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void RemovePref(PrefStore* pref_store, const char* path); | 57 void RemovePref(PrefStore* pref_store, const char* path); |
| 58 | 58 |
| 59 // Pointers to the pref stores our value store uses. | 59 // Pointers to the pref stores our value store uses. |
| 60 PrefStore* managed_prefs_; | 60 PrefStore* managed_prefs_; |
| 61 PrefStore* user_prefs_; | 61 PrefStore* user_prefs_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(TestingPrefService); | 63 DISALLOW_COPY_AND_ASSIGN(TestingPrefService); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 #endif // CHROME_TEST_TESTING_PREF_SERVICE_H_ | 66 #endif // CHROME_TEST_TESTING_PREF_SERVICE_H_ |
| OLD | NEW |