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

Unified Diff: chrome/browser/policy/configuration_policy_pref_store.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/configuration_policy_pref_store.cc
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index 5bdcabd18da08f37c39f2972dc147315a266db0e..129cd68144fd9fc20478984dd5c072f9255b0aca 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -848,18 +848,10 @@ bool ConfigurationPolicyPrefKeeper::HasProxyPolicy(
return true;
}
-ConfigurationPolicyPrefStore::ConfigurationPolicyPrefStore(
- ConfigurationPolicyProvider* provider)
- : provider_(provider),
- initialization_complete_(false) {
- if (provider_) {
- // Read initial policy.
- policy_keeper_.reset(new ConfigurationPolicyPrefKeeper(provider));
- registrar_.Init(provider_, this);
- initialization_complete_ = provider->IsInitializationComplete();
- } else {
- initialization_complete_ = true;
- }
+// static
+ConfigurationPolicyPrefStore* ConfigurationPolicyPrefStore::Create(
+ ConfigurationPolicyProvider* provider) {
+ return new ConfigurationPolicyPrefStore(provider);
}
ConfigurationPolicyPrefStore::~ConfigurationPolicyPrefStore() {
@@ -1111,6 +1103,20 @@ ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList() {
return &policy_list;
}
+ConfigurationPolicyPrefStore::ConfigurationPolicyPrefStore(
+ ConfigurationPolicyProvider* provider)
+ : provider_(provider),
+ initialization_complete_(false) {
+ if (provider_) {
+ // Read initial policy.
+ policy_keeper_.reset(new ConfigurationPolicyPrefKeeper(provider));
+ registrar_.Init(provider_, this);
+ initialization_complete_ = provider->IsInitializationComplete();
+ } else {
+ initialization_complete_ = true;
+ }
+}
+
void ConfigurationPolicyPrefStore::Refresh() {
if (!provider_)
return;

Powered by Google App Engine
This is Rietveld 408576698