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

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

Issue 7298012: Consolidate data storage and notifications in the cloud policy subsystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/policy/browser_policy_connector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/task.h" 14 #include "base/task.h"
14 #include "chrome/browser/policy/enterprise_install_attributes.h" 15 #include "chrome/browser/policy/enterprise_install_attributes.h"
15 #include "content/common/notification_observer.h" 16 #include "content/common/notification_observer.h"
16 #include "content/common/notification_registrar.h" 17 #include "content/common/notification_registrar.h"
17 18
18 class FilePath; 19 class FilePath;
19 class TestingBrowserProcess; 20 class TestingBrowserProcess;
20 class TokenService; 21 class TokenService;
21 22
22 namespace policy { 23 namespace policy {
23 24
25 class CloudPolicyDataStore;
24 class CloudPolicyProvider; 26 class CloudPolicyProvider;
25 class CloudPolicySubsystem; 27 class CloudPolicySubsystem;
26 class ConfigurationPolicyProvider; 28 class ConfigurationPolicyProvider;
27 class UserPolicyIdentityStrategy; 29 class UserPolicyTokenCache;
28
29 #if defined(OS_CHROMEOS)
30 class DevicePolicyIdentityStrategy;
31 #endif
32 30
33 // Manages the lifecycle of browser-global policy infrastructure, such as the 31 // Manages the lifecycle of browser-global policy infrastructure, such as the
34 // platform policy providers, device- and the user-cloud policy infrastructure. 32 // platform policy providers, device- and the user-cloud policy infrastructure.
35 // TODO(gfeher,mnissler): Factor out device and user specific methods into their 33 // TODO(gfeher,mnissler): Factor out device and user specific methods into their
36 // respective classes. 34 // respective classes.
37 class BrowserPolicyConnector : public NotificationObserver { 35 class BrowserPolicyConnector : public NotificationObserver {
38 public: 36 public:
39 static BrowserPolicyConnector* Create(); 37 static BrowserPolicyConnector* Create();
40 virtual ~BrowserPolicyConnector(); 38 virtual ~BrowserPolicyConnector();
41 39
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // be running. 125 // be running.
128 void InitializeDevicePolicySubsystem(); 126 void InitializeDevicePolicySubsystem();
129 127
130 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; 128 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_;
131 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; 129 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_;
132 130
133 scoped_ptr<CloudPolicyProvider> managed_cloud_provider_; 131 scoped_ptr<CloudPolicyProvider> managed_cloud_provider_;
134 scoped_ptr<CloudPolicyProvider> recommended_cloud_provider_; 132 scoped_ptr<CloudPolicyProvider> recommended_cloud_provider_;
135 133
136 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
137 scoped_ptr<DevicePolicyIdentityStrategy> device_identity_strategy_; 135 scoped_ptr<CloudPolicyDataStore> device_data_store_;
138 scoped_ptr<CloudPolicySubsystem> device_cloud_policy_subsystem_; 136 scoped_ptr<CloudPolicySubsystem> device_cloud_policy_subsystem_;
139 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; 137 scoped_ptr<EnterpriseInstallAttributes> install_attributes_;
140 #endif 138 #endif
141 139
142 scoped_ptr<UserPolicyIdentityStrategy> user_identity_strategy_; 140 scoped_refptr<UserPolicyTokenCache> user_policy_token_cache_;
141 scoped_ptr<CloudPolicyDataStore> user_data_store_;
143 scoped_ptr<CloudPolicySubsystem> user_cloud_policy_subsystem_; 142 scoped_ptr<CloudPolicySubsystem> user_cloud_policy_subsystem_;
144 143
145 ScopedRunnableMethodFactory<BrowserPolicyConnector> method_factory_; 144 ScopedRunnableMethodFactory<BrowserPolicyConnector> method_factory_;
146 145
147 // Registers the provider for notification of successful Gaia logins. 146 // Registers the provider for notification of successful Gaia logins.
148 NotificationRegistrar registrar_; 147 NotificationRegistrar registrar_;
149 148
150 // Weak reference to the TokenService we are listening to for user cloud 149 // Weak reference to the TokenService we are listening to for user cloud
151 // policy authentication tokens. 150 // policy authentication tokens.
152 TokenService* token_service_; 151 TokenService* token_service_;
153 152
154 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); 153 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector);
155 }; 154 };
156 155
157 } // namespace policy 156 } // namespace policy
158 157
159 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 158 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/browser_policy_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698