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

Unified Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 7096013: Allow device policy code to be optionally included. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make changes requested by torne. Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.h ('k') | chrome/browser/policy/configuration_policy_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698