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/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 PrefStore* extension_prefs, | 27 PrefStore* extension_prefs, |
28 PrefStore* command_line_prefs, | 28 PrefStore* command_line_prefs, |
29 PrefStore* user_prefs, | 29 PrefStore* user_prefs, |
30 PrefStore* recommended_prefs, | 30 PrefStore* recommended_prefs, |
31 PrefStore* default_prefs); | 31 PrefStore* default_prefs); |
32 }; | 32 }; |
33 | 33 |
34 // Create an empty instance. | 34 // Create an empty instance. |
35 TestingPrefService(); | 35 TestingPrefService(); |
36 | 36 |
| 37 // Create an instance with specific pref stores. |
| 38 TestingPrefService(PrefStore* managed_prefs, |
| 39 PrefStore* device_management_prefs, |
| 40 PrefStore* extension_prefs, |
| 41 PrefStore* command_line_prefs, |
| 42 PrefStore* user_prefs, |
| 43 PrefStore* recommended_prefs, |
| 44 PrefStore* default_prefs); |
| 45 |
37 // Create an instance that has a managed PrefStore and a command- line | 46 // Create an instance that has a managed PrefStore and a command- line |
38 // PrefStore. |managed_platform_provider| contains the provider with which to | 47 // PrefStore. |managed_platform_provider| contains the provider with which to |
39 // initialize the managed platform PrefStore. If it is NULL, then a | 48 // initialize the managed platform PrefStore. If it is NULL, then a |
40 // DummyPrefStore will be created. |device_management_provider| contains the | 49 // DummyPrefStore will be created. |device_management_provider| contains the |
41 // provider with which to initialize the device management | 50 // provider with which to initialize the device management |
42 // PrefStore. |command_line| contains the provider with which to initialize | 51 // PrefStore. |command_line| contains the provider with which to initialize |
43 // the command line PrefStore. If it is NULL then a DummyPrefStore will be | 52 // the command line PrefStore. If it is NULL then a DummyPrefStore will be |
44 // created as the command line PrefStore. | 53 // created as the command line PrefStore. |
45 TestingPrefService( | 54 TestingPrefService( |
46 policy::ConfigurationPolicyProvider* managed_platform_provider, | 55 policy::ConfigurationPolicyProvider* managed_platform_provider, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Pointers to the pref stores our value store uses. | 108 // Pointers to the pref stores our value store uses. |
100 PrefStore* managed_platform_prefs_; // weak | 109 PrefStore* managed_platform_prefs_; // weak |
101 PrefStore* device_management_prefs_; // weak | 110 PrefStore* device_management_prefs_; // weak |
102 PrefStore* user_prefs_; // weak | 111 PrefStore* user_prefs_; // weak |
103 PrefStore* default_prefs_; // weak | 112 PrefStore* default_prefs_; // weak |
104 | 113 |
105 DISALLOW_COPY_AND_ASSIGN(TestingPrefService); | 114 DISALLOW_COPY_AND_ASSIGN(TestingPrefService); |
106 }; | 115 }; |
107 | 116 |
108 #endif // CHROME_TEST_TESTING_PREF_SERVICE_H_ | 117 #endif // CHROME_TEST_TESTING_PREF_SERVICE_H_ |
OLD | NEW |