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

Unified Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 1343743002: Remove dependency of PrefSyncableServiceFactory on //chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Rebase Created 5 years, 3 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/prefs/chrome_pref_service_factory.cc
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index 5bd3623f22bb1650e03f8d41eb8a91cc3e6af3bf..13f4ff78248f2ba7eab5fb05ceab587f2405a372 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -54,7 +54,6 @@
#if defined(ENABLE_CONFIGURATION_POLICY)
#include "components/policy/core/browser/browser_policy_connector.h"
#include "components/policy/core/browser/configuration_policy_pref_store.h"
-#include "components/policy/core/common/policy_types.h"
#endif
#if defined(ENABLE_EXTENSIONS)
@@ -427,17 +426,10 @@ void PrepareFactory(
const scoped_refptr<PrefStore>& extension_prefs,
bool async) {
#if defined(ENABLE_CONFIGURATION_POLICY)
- using policy::ConfigurationPolicyPrefStore;
- factory->set_managed_prefs(
- make_scoped_refptr(new ConfigurationPolicyPrefStore(
- policy_service,
- g_browser_process->browser_policy_connector()->GetHandlerList(),
- policy::POLICY_LEVEL_MANDATORY)));
- factory->set_recommended_prefs(
- make_scoped_refptr(new ConfigurationPolicyPrefStore(
- policy_service,
- g_browser_process->browser_policy_connector()->GetHandlerList(),
- policy::POLICY_LEVEL_RECOMMENDED)));
+ policy::BrowserPolicyConnector* policy_connector =
+ g_browser_process->browser_policy_connector();
+ factory->SetManagedPolicies(policy_service, policy_connector);
+ factory->SetRecommendedPolicies(policy_service, policy_connector);
#endif // ENABLE_CONFIGURATION_POLICY
#if defined(ENABLE_SUPERVISED_USERS)

Powered by Google App Engine
This is Rietveld 408576698