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

Unified Diff: chrome/test/testing_pref_service.h

Issue 4876002: Create additional PrefStore for Device Management policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/pref_value_store_unittest.cc ('k') | chrome/test/testing_pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_pref_service.h
diff --git a/chrome/test/testing_pref_service.h b/chrome/test/testing_pref_service.h
index b0954e2d57ac1b47ec3d401faf6c253a9631667c..069ff321af23a1bc7c62a3ec75b00d48caae8f1e 100644
--- a/chrome/test/testing_pref_service.h
+++ b/chrome/test/testing_pref_service.h
@@ -23,6 +23,7 @@ class TestingPrefService : public PrefService {
class TestingPrefValueStore : public PrefValueStore {
public:
TestingPrefValueStore(PrefStore* managed_prefs,
+ PrefStore* device_management_prefs,
PrefStore* extension_prefs,
PrefStore* command_line_prefs,
PrefStore* user_prefs,
@@ -33,15 +34,18 @@ class TestingPrefService : public PrefService {
// Create an empty instance.
TestingPrefService();
- // Create an instance that has a managed PrefStore and a command-
- // line PrefStore. |provider| contains the provider with which to
- // initialize the managed PrefStore. If it is NULL, then a
- // DummyPrefStore will be created. |command_line| contains the
- // provider with which to initialize the command line PrefStore. If
- // it is NULL then a DummyPrefStore will be created as the command
- // line PrefStore.
- TestingPrefService(policy::ConfigurationPolicyProvider* provider,
- CommandLine* command_line);
+ // Create an instance that has a managed PrefStore and a command- line
+ // PrefStore. |managed_platform_provider| contains the provider with which to
+ // initialize the managed platform PrefStore. If it is NULL, then a
+ // DummyPrefStore will be created. |device_management_provider| contains the
+ // provider with which to initialize the device management
+ // PrefStore. |command_line| contains the provider with which to initialize
+ // the command line PrefStore. If it is NULL then a DummyPrefStore will be
+ // created as the command line PrefStore.
+ TestingPrefService(
+ policy::ConfigurationPolicyProvider* managed_platform_provider,
+ policy::ConfigurationPolicyProvider* device_management_provider,
+ CommandLine* command_line);
// Read the value of a preference from the managed layer. Returns NULL if the
// preference is not defined at the managed layer.
@@ -75,7 +79,7 @@ class TestingPrefService : public PrefService {
private:
// Creates a ConfigurationPolicyPrefStore based on the provided
// |provider| or a DummyPrefStore if |provider| is NULL.
- PrefStore* CreateManagedPrefStore(
+ PrefStore* CreatePolicyPrefStoreFromProvider(
policy::ConfigurationPolicyProvider* provider);
// Creates a CommandLinePrefStore based on the supplied
@@ -93,9 +97,10 @@ class TestingPrefService : public PrefService {
void RemovePref(PrefStore* pref_store, const char* path);
// Pointers to the pref stores our value store uses.
- PrefStore* managed_prefs_;
- PrefStore* user_prefs_;
- PrefStore* default_prefs_;
+ PrefStore* managed_platform_prefs_; // weak
+ PrefStore* device_management_prefs_; // weak
+ PrefStore* user_prefs_; // weak
+ PrefStore* default_prefs_; // weak
DISALLOW_COPY_AND_ASSIGN(TestingPrefService);
};
« no previous file with comments | « chrome/browser/prefs/pref_value_store_unittest.cc ('k') | chrome/test/testing_pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698