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

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

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 822021a6626d4c2af8de7f09def1ac053e0b6b89..820e0f4d0cf965c40e9453719397a7bfcba232cf 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -826,18 +826,8 @@ ConfigurationPolicyPrefStore::CreateManagedPlatformPolicyPrefStore() {
ConfigurationPolicyPrefStore*
ConfigurationPolicyPrefStore::CreateManagedCloudPolicyPrefStore(
Profile* profile) {
- ConfigurationPolicyProvider* provider = NULL;
- if (profile) {
- // For user policy, return the profile's policy provider.
- provider = policy::ProfilePolicyConnectorFactory::GetForProfile(profile)->
- GetManagedCloudProvider();
- } else {
- // For device policy, return the provider of the browser process.
- BrowserPolicyConnector* connector =
- g_browser_process->browser_policy_connector();
- provider = connector->GetManagedCloudProvider();
- }
- return new ConfigurationPolicyPrefStore(provider);
+ return new ConfigurationPolicyPrefStore(
+ g_browser_process->managed_cloud_policy_provider());
}
// static
@@ -851,20 +841,9 @@ ConfigurationPolicyPrefStore::CreateRecommendedPlatformPolicyPrefStore() {
// static
ConfigurationPolicyPrefStore*
-ConfigurationPolicyPrefStore::CreateRecommendedCloudPolicyPrefStore(
- Profile* profile) {
- ConfigurationPolicyProvider* provider = NULL;
- if (profile) {
- // For user policy, return the profile's policy provider.
- provider = policy::ProfilePolicyConnectorFactory::GetForProfile(profile)->
- GetRecommendedCloudProvider();
- } else {
- // For device policy, return the provider of the browser process.
- BrowserPolicyConnector* connector =
- g_browser_process->browser_policy_connector();
- provider = connector->GetRecommendedCloudProvider();
- }
- return new ConfigurationPolicyPrefStore(provider);
+ConfigurationPolicyPrefStore::CreateRecommendedCloudPolicyPrefStore() {
+ return new ConfigurationPolicyPrefStore(
+ g_browser_process->recommended_cloud_policy_provider());
}
/* static */

Powered by Google App Engine
This is Rietveld 408576698