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

Unified Diff: chrome/browser/policy/cloud/component_cloud_policy_service.h

Issue 79023002: Support cloud policy for extensions on the desktop platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/cloud/component_cloud_policy_service.h
diff --git a/chrome/browser/policy/cloud/component_cloud_policy_service.h b/chrome/browser/policy/cloud/component_cloud_policy_service.h
index a0dcbe2748896854579a373e692b771a40d7443e..75fcef1af96b4ec435639aff53735a1d5dc43c53 100644
--- a/chrome/browser/policy/cloud/component_cloud_policy_service.h
+++ b/chrome/browser/policy/cloud/component_cloud_policy_service.h
@@ -74,7 +74,9 @@ class ComponentCloudPolicyService : public CloudPolicyClient::Observer,
Delegate* delegate,
SchemaRegistry* schema_registry,
CloudPolicyCore* core,
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
scoped_ptr<ResourceCache> cache,
+#endif
scoped_refptr<net::URLRequestContextGetter> request_context,
scoped_refptr<base::SequencedTaskRunner> backend_task_runner,
scoped_refptr<base::SequencedTaskRunner> io_task_runner);
@@ -109,6 +111,7 @@ class ComponentCloudPolicyService : public CloudPolicyClient::Observer,
virtual void OnClientError(CloudPolicyClient* client) OVERRIDE;
private:
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
class Backend;
void InitializeIfReady();
@@ -141,10 +144,16 @@ class ComponentCloudPolicyService : public CloudPolicyClient::Observer,
// determine which components changed when a new SchemaMap becomes
// available.
scoped_refptr<SchemaMap> current_schema_map_;
+#endif // !defined(OS_ANDROID) && !defined(OS_IOS)
// Contains all the current policies for components.
PolicyBundle policy_;
+ // Whether the backend has started initializing asynchronously. Used to
+ // prevent double initialization, since both OnSchemaRegistryUpdated() and
+ // OnStoreLoaded() can happen while the backend is initializing.
+ bool started_loading_initial_policy_;
+
// Whether the backend has been initialized with the initial credentials and
// schemas, and this provider is serving the initial policies loaded from the
// cache.

Powered by Google App Engine
This is Rietveld 408576698