OLD | NEW |
---|---|
1 // Copyright (c) 2011 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_data_store.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 TestingBrowserProcess; | 20 class TestingBrowserProcess; |
Joao da Silva
2012/01/03 08:19:02
Nit: not used
Mattias Nissler (ping if slow)
2012/01/03 10:02:45
Done.
| |
21 class TokenService; | 21 class TokenService; |
22 | 22 |
23 namespace policy { | 23 namespace policy { |
24 | 24 |
25 class CloudPolicyDataStore; | |
25 class CloudPolicyProvider; | 26 class CloudPolicyProvider; |
26 class CloudPolicySubsystem; | 27 class CloudPolicySubsystem; |
27 class ConfigurationPolicyProvider; | 28 class ConfigurationPolicyProvider; |
28 class NetworkConfigurationUpdater; | 29 class NetworkConfigurationUpdater; |
29 class UserPolicyTokenCache; | 30 class UserPolicyTokenCache; |
30 | 31 |
31 // Manages the lifecycle of browser-global policy infrastructure, such as the | 32 // Manages the lifecycle of browser-global policy infrastructure, such as the |
32 // platform policy providers, device- and the user-cloud policy infrastructure. | 33 // platform policy providers, device- and the user-cloud policy infrastructure. |
33 // TODO(gfeher,mnissler): Factor out device and user specific methods into their | 34 // TODO(gfeher,mnissler): Factor out device and user specific methods into their |
34 // respective classes. | 35 // respective classes. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 // isn't being used. | 117 // isn't being used. |
117 void RegisterForUserPolicy(const std::string& oauth_token); | 118 void RegisterForUserPolicy(const std::string& oauth_token); |
118 | 119 |
119 const CloudPolicyDataStore* GetDeviceCloudPolicyDataStore() const; | 120 const CloudPolicyDataStore* GetDeviceCloudPolicyDataStore() const; |
120 const CloudPolicyDataStore* GetUserCloudPolicyDataStore() const; | 121 const CloudPolicyDataStore* GetUserCloudPolicyDataStore() const; |
121 | 122 |
122 const ConfigurationPolicyHandlerList* GetHandlerList() const; | 123 const ConfigurationPolicyHandlerList* GetHandlerList() const; |
123 | 124 |
124 // Works out the user affiliation by checking the given |user_name| against | 125 // Works out the user affiliation by checking the given |user_name| against |
125 // the installation attributes. | 126 // the installation attributes. |
126 policy::CloudPolicyDataStore::UserAffiliation GetUserAffiliation( | 127 UserAffiliation GetUserAffiliation(const std::string& user_name); |
127 const std::string& user_name); | |
128 | 128 |
129 private: | 129 private: |
130 // content::NotificationObserver method overrides: | 130 // content::NotificationObserver method overrides: |
131 virtual void Observe(int type, | 131 virtual void Observe(int type, |
132 const content::NotificationSource& source, | 132 const content::NotificationSource& source, |
133 const content::NotificationDetails& details) OVERRIDE; | 133 const content::NotificationDetails& details) OVERRIDE; |
134 | 134 |
135 // Initializes the device cloud policy infrasturcture. | 135 // Initializes the device cloud policy infrasturcture. |
136 void InitializeDevicePolicy(); | 136 void InitializeDevicePolicy(); |
137 | 137 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 | 173 |
174 // Used to convert policies to preferences. | 174 // Used to convert policies to preferences. |
175 ConfigurationPolicyHandlerList handler_list_; | 175 ConfigurationPolicyHandlerList handler_list_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 177 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace policy | 180 } // namespace policy |
181 | 181 |
182 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 182 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
OLD | NEW |