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

Side by Side Diff: components/policy/core/common/cloud/component_cloud_policy_service.h

Issue 337053005: Precache policy-for-extensions for device-local accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed ios tests Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // must only be accessed and eventually destroyed via the 144 // must only be accessed and eventually destroyed via the
145 // |backend_task_runner_|. 145 // |backend_task_runner_|.
146 scoped_ptr<Backend> backend_; 146 scoped_ptr<Backend> backend_;
147 147
148 // The currently registered components for each policy domain. Used to 148 // The currently registered components for each policy domain. Used to
149 // determine which components changed when a new SchemaMap becomes 149 // determine which components changed when a new SchemaMap becomes
150 // available. 150 // available.
151 scoped_refptr<SchemaMap> current_schema_map_; 151 scoped_refptr<SchemaMap> current_schema_map_;
152 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 152 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
153 153
154 // Contains all the current policies for components. 154 // Contains all the policies loaded from the store, before having been
155 // filtered by the |current_schema_map_|.
156 scoped_ptr<PolicyBundle> unfiltered_policy_;
157
158 // Contains all the current policies for components, filtered by the
159 // |current_schema_map_|.
155 PolicyBundle policy_; 160 PolicyBundle policy_;
156 161
157 // Whether the backend has started initializing asynchronously. Used to 162 // Whether the backend has started initializing asynchronously. Used to
158 // prevent double initialization, since both OnSchemaRegistryUpdated() and 163 // prevent double initialization, since both OnSchemaRegistryUpdated() and
159 // OnStoreLoaded() can happen while the backend is initializing. 164 // OnStoreLoaded() can happen while the backend is initializing.
160 bool started_loading_initial_policy_; 165 bool started_loading_initial_policy_;
161 166
162 // Whether the backend has been initialized with the initial credentials and 167 // Whether the backend has been initialized with the initial credentials and
163 // schemas, and this provider is serving the initial policies loaded from the 168 // schemas, and this provider is serving the initial policies loaded from the
164 // cache. 169 // cache.
165 bool loaded_initial_policy_; 170 bool loaded_initial_policy_;
166 171
167 // True if the backend currently has valid cloud policy credentials. This 172 // True if the backend currently has valid cloud policy credentials. This
168 // can go back to false if the user signs out, and back again to true if the 173 // can go back to false if the user signs out, and back again to true if the
169 // user signs in again. 174 // user signs in again.
170 bool is_registered_for_cloud_policy_; 175 bool is_registered_for_cloud_policy_;
171 176
172 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_; 177 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_;
173 178
174 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService); 179 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService);
175 }; 180 };
176 181
177 } // namespace policy 182 } // namespace policy
178 183
179 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ 184 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698