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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.h

Issue 10449071: Enable user policy handling through the new cloud policy stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 5 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/policy/cloud_policy_constants.h" 14 #include "chrome/browser/policy/cloud_policy_constants.h"
15 #include "chrome/browser/policy/configuration_policy_handler_list.h" 15 #include "chrome/browser/policy/configuration_policy_handler_list.h"
16 #include "chrome/browser/policy/enterprise_install_attributes.h" 16 #include "chrome/browser/policy/enterprise_install_attributes.h"
17 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 19
20 class Profile; 20 class Profile;
21 class TokenService; 21 class TokenService;
22 22
23 namespace policy { 23 namespace policy {
24 24
25 class AppPackUpdater; 25 class AppPackUpdater;
26 class CloudPolicyDataStore; 26 class CloudPolicyDataStore;
27 class CloudPolicyProvider; 27 class CloudPolicyProvider;
28 class CloudPolicySubsystem; 28 class CloudPolicySubsystem;
29 class ConfigurationPolicyProvider; 29 class ConfigurationPolicyProvider;
30 class DeviceManagementService;
30 class PolicyService; 31 class PolicyService;
32 class UserCloudPolicyManager;
31 class UserPolicyTokenCache; 33 class UserPolicyTokenCache;
32 34
33 // Manages the lifecycle of browser-global policy infrastructure, such as the 35 // Manages the lifecycle of browser-global policy infrastructure, such as the
34 // platform policy providers, device- and the user-cloud policy infrastructure. 36 // platform policy providers, device- and the user-cloud policy infrastructure.
35 // TODO(gfeher,mnissler): Factor out device and user specific methods into their 37 // TODO(gfeher,mnissler): Factor out device and user specific methods into their
36 // respective classes. 38 // respective classes.
37 class BrowserPolicyConnector : public content::NotificationObserver { 39 class BrowserPolicyConnector : public content::NotificationObserver {
38 public: 40 public:
39 // Builds an uninitialized BrowserPolicyConnector, suitable for testing. 41 // Builds an uninitialized BrowserPolicyConnector, suitable for testing.
40 // Init() should be called to create and start the policy machinery. 42 // Init() should be called to create and start the policy machinery.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 #if defined(OS_CHROMEOS) 164 #if defined(OS_CHROMEOS)
163 scoped_ptr<CloudPolicyDataStore> device_data_store_; 165 scoped_ptr<CloudPolicyDataStore> device_data_store_;
164 scoped_ptr<CloudPolicySubsystem> device_cloud_policy_subsystem_; 166 scoped_ptr<CloudPolicySubsystem> device_cloud_policy_subsystem_;
165 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; 167 scoped_ptr<EnterpriseInstallAttributes> install_attributes_;
166 #endif 168 #endif
167 169
168 scoped_ptr<UserPolicyTokenCache> user_policy_token_cache_; 170 scoped_ptr<UserPolicyTokenCache> user_policy_token_cache_;
169 scoped_ptr<CloudPolicyDataStore> user_data_store_; 171 scoped_ptr<CloudPolicyDataStore> user_data_store_;
170 scoped_ptr<CloudPolicySubsystem> user_cloud_policy_subsystem_; 172 scoped_ptr<CloudPolicySubsystem> user_cloud_policy_subsystem_;
171 173
174 // Components of the new-style cloud policy implementation.
175 // TODO(mnissler): Remove the old-style components above once we have
176 // completed the switch to the new cloud policy implementation.
177 scoped_ptr<DeviceManagementService> device_management_service_;
178
179 scoped_ptr<UserCloudPolicyManager> user_cloud_policy_manager_;
180
172 // Used to initialize the device policy subsystem once the message loops 181 // Used to initialize the device policy subsystem once the message loops
173 // are spinning. 182 // are spinning.
174 base::WeakPtrFactory<BrowserPolicyConnector> weak_ptr_factory_; 183 base::WeakPtrFactory<BrowserPolicyConnector> weak_ptr_factory_;
175 184
176 // Registers the provider for notification of successful Gaia logins. 185 // Registers the provider for notification of successful Gaia logins.
177 content::NotificationRegistrar registrar_; 186 content::NotificationRegistrar registrar_;
178 187
179 // Weak reference to the TokenService we are listening to for user cloud 188 // Weak reference to the TokenService we are listening to for user cloud
180 // policy authentication tokens. 189 // policy authentication tokens.
181 TokenService* token_service_; 190 TokenService* token_service_;
182 191
183 // Used to convert policies to preferences. 192 // Used to convert policies to preferences.
184 ConfigurationPolicyHandlerList handler_list_; 193 ConfigurationPolicyHandlerList handler_list_;
185 194
186 #if defined(OS_CHROMEOS) 195 #if defined(OS_CHROMEOS)
187 scoped_ptr<AppPackUpdater> app_pack_updater_; 196 scoped_ptr<AppPackUpdater> app_pack_updater_;
188 #endif 197 #endif
189 198
190 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); 199 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector);
191 }; 200 };
192 201
193 } // namespace policy 202 } // namespace policy
194 203
195 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 204 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698