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

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

Issue 7147015: Move user cloud policy to BrowserProcess (was 6979011) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_test include breakage 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 b85b7c95c216ad50d7ef5d80b9cecde6fc46a791..ffbcfce390951801a4088e9c54c487457bbceeae 100644
--- a/chrome/browser/policy/cloud_policy_subsystem.cc
+++ b/chrome/browser/policy/cloud_policy_subsystem.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/policy/cloud_policy_cache_base.h"
#include "chrome/browser/policy/cloud_policy_controller.h"
#include "chrome/browser/policy/cloud_policy_identity_strategy.h"
-#include "chrome/browser/policy/configuration_policy_provider.h"
#include "chrome/browser/policy/device_management_service.h"
#include "chrome/browser/policy/device_token_fetcher.h"
#include "chrome/browser/policy/policy_notifier.h"
@@ -136,21 +135,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,
@@ -176,10 +160,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/cloud_policy_subsystem_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698