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

Unified Diff: chrome/browser/policy/async_policy_provider.h

Issue 56623005: Policy providers all get a SchemaRegistry to work with. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-policy-schema-9-purge-with-callback
Patch Set: Fixed mac tests Created 7 years, 1 month 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/async_policy_provider.h
diff --git a/chrome/browser/policy/async_policy_provider.h b/chrome/browser/policy/async_policy_provider.h
index 3302b9652ee0b0514e1eebaee55527c4d56651b2..473819f601a8698fcb18d2745c39b2014f6c47d1 100644
--- a/chrome/browser/policy/async_policy_provider.h
+++ b/chrome/browser/policy/async_policy_provider.h
@@ -20,6 +20,7 @@ namespace policy {
class AsyncPolicyLoader;
class PolicyBundle;
+class SchemaRegistry;
// A policy provider that loads its policies asynchronously on a background
// thread. Platform-specific providers are created by passing an implementation
@@ -27,15 +28,17 @@ class PolicyBundle;
class AsyncPolicyProvider : public ConfigurationPolicyProvider,
public base::NonThreadSafe {
public:
- explicit AsyncPolicyProvider(scoped_ptr<AsyncPolicyLoader> loader);
+ // The AsyncPolicyProvider does a synchronous load on its constructor, and
bartfab (slow) 2013/11/05 15:53:04 Nit: s/on/in/
Joao da Silva 2013/11/07 13:15:00 Done.
+ // therefore it needs the |registry| at construction time. The same |registry|
+ // should be passed later to Init().
+ AsyncPolicyProvider(SchemaRegistry* registry,
+ scoped_ptr<AsyncPolicyLoader> loader);
virtual ~AsyncPolicyProvider();
// ConfigurationPolicyProvider implementation.
- virtual void Init() OVERRIDE;
+ virtual void Init(SchemaRegistry* registry) OVERRIDE;
virtual void Shutdown() OVERRIDE;
virtual void RefreshPolicies() OVERRIDE;
- virtual void RegisterPolicyDomain(
- scoped_refptr<const PolicyDomainDescriptor> descriptor) OVERRIDE;
private:
// Helper for RefreshPolicies().

Powered by Google App Engine
This is Rietveld 408576698