Index: chrome/browser/policy/browser_policy_connector.cc |
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc |
index efc923f6d7a35d4aa1c145c62f6d61e50e15ca5e..a458a13690fe33867d1a28a0a93378d35a321ef4 100644 |
--- a/chrome/browser/policy/browser_policy_connector.cc |
+++ b/chrome/browser/policy/browser_policy_connector.cc |
@@ -45,6 +45,16 @@ BrowserPolicyConnector* BrowserPolicyConnector::Create() { |
return new BrowserPolicyConnector(); |
} |
+// static |
+BrowserPolicyConnector* BrowserPolicyConnector::CreateForTests() { |
+ const policy::ConfigurationPolicyProvider::PolicyDefinitionList* |
+ policy_list = policy::ConfigurationPolicyPrefStore:: |
+ GetChromePolicyDefinitionList(); |
+ return new BrowserPolicyConnector( |
+ new policy::DummyConfigurationPolicyProvider(policy_list), |
+ new policy::DummyConfigurationPolicyProvider(policy_list)); |
+} |
+ |
BrowserPolicyConnector::BrowserPolicyConnector() |
: ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { |
managed_platform_provider_.reset(CreateManagedPlatformProvider()); |