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. |