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

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

Issue 10386097: Refactored ConfigurationPolicyProvider to provide PolicyBundles instead of PolicyMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 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
« no previous file with comments | « chrome/browser/policy/asynchronous_policy_provider.h ('k') | chrome/browser/policy/cloud_policy_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/asynchronous_policy_provider.cc
diff --git a/chrome/browser/policy/asynchronous_policy_provider.cc b/chrome/browser/policy/asynchronous_policy_provider.cc
index 01a647c5ab7b9d0dd11f4c76b1c59b187039dcec..911a251a14ca9246cf54ca8f33b62e133ad8eb6c 100644
--- a/chrome/browser/policy/asynchronous_policy_provider.cc
+++ b/chrome/browser/policy/asynchronous_policy_provider.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "chrome/browser/policy/asynchronous_policy_loader.h"
-#include "chrome/browser/policy/policy_map.h"
+#include "chrome/browser/policy/policy_bundle.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
@@ -32,12 +32,6 @@ AsynchronousPolicyProvider::~AsynchronousPolicyProvider() {
loader_->Stop();
}
-bool AsynchronousPolicyProvider::ProvideInternal(PolicyMap* map) {
- DCHECK(CalledOnValidThread());
- map->CopyFrom(loader_->policy());
- return true;
-}
-
void AsynchronousPolicyProvider::RefreshPolicies() {
DCHECK(CalledOnValidThread());
pending_refreshes_++;
@@ -63,10 +57,11 @@ void AsynchronousPolicyProvider::OnReloadPosted() {
pending_refreshes_--;
}
-void AsynchronousPolicyProvider::OnLoaderReloaded() {
+void AsynchronousPolicyProvider::OnLoaderReloaded(
+ scoped_ptr<PolicyBundle> bundle) {
DCHECK(CalledOnValidThread());
if (pending_refreshes_ == 0)
- NotifyPolicyUpdated();
+ UpdatePolicy(bundle.Pass());
}
} // namespace policy
« no previous file with comments | « chrome/browser/policy/asynchronous_policy_provider.h ('k') | chrome/browser/policy/cloud_policy_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698