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

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

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by mnissler. Created 9 years, 6 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/cloud_policy_subsystem.cc
diff --git a/chrome/browser/policy/cloud_policy_subsystem.cc b/chrome/browser/policy/cloud_policy_subsystem.cc
index b4ed8a0c7fdceaa7b90568ca3e102c4c230a40b2..62d84d604215d52ed608b8a1ff1ed19da85710e0 100644
--- a/chrome/browser/policy/cloud_policy_subsystem.cc
+++ b/chrome/browser/policy/cloud_policy_subsystem.cc
@@ -134,21 +134,6 @@ void CloudPolicySubsystem::StopAutoRetry() {
device_token_fetcher_->StopAutoRetry();
}
-ConfigurationPolicyProvider* CloudPolicySubsystem::GetManagedPolicyProvider() {
- if (cloud_policy_cache_.get())
- return cloud_policy_cache_->GetManagedPolicyProvider();
-
- return NULL;
-}
-
-ConfigurationPolicyProvider*
- CloudPolicySubsystem::GetRecommendedPolicyProvider() {
- if (cloud_policy_cache_.get())
- return cloud_policy_cache_->GetRecommendedPolicyProvider();
-
- return NULL;
-}
-
// static
void CloudPolicySubsystem::RegisterPrefs(PrefService* pref_service) {
pref_service->RegisterIntegerPref(prefs::kDevicePolicyRefreshRate,
@@ -174,10 +159,9 @@ void CloudPolicySubsystem::Observe(NotificationType type,
if (type == NotificationType::PREF_CHANGED) {
DCHECK_EQ(*(Details<std::string>(details).ptr()),
std::string(refresh_pref_name_));
- PrefService* pref_service = Source<PrefService>(source).ptr();
- // Temporarily also consider the profile preference service as a valid
- // source, since we cannot yet push user cloud policy to |local_state|.
- UpdatePolicyRefreshRate(pref_service->GetInteger(refresh_pref_name_));
+ PrefService* local_state = g_browser_process->local_state();
+ DCHECK_EQ(Source<PrefService>(source).ptr(), local_state);
+ UpdatePolicyRefreshRate(local_state->GetInteger(refresh_pref_name_));
} else {
NOTREACHED();
}
« no previous file with comments | « chrome/browser/policy/cloud_policy_subsystem.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