OLD | NEW |
---|---|
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/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/task.h" | 13 #include "base/task.h" |
14 #include "chrome/browser/policy/enterprise_install_attributes.h" | 14 #include "chrome/browser/policy/enterprise_install_attributes.h" |
15 | 15 |
16 class PrefService; | 16 class PrefService; |
17 class TestingBrowserProcess; | 17 class TestingBrowserProcess; |
18 class TokenService; | 18 class TokenService; |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 class URLRequestContextGetter; | 21 class URLRequestContextGetter; |
22 } | 22 } |
23 | 23 |
24 namespace policy { | 24 namespace policy { |
25 | 25 |
26 class CloudPolicyProvider; | |
26 class CloudPolicySubsystem; | 27 class CloudPolicySubsystem; |
27 class ConfigurationPolicyProvider; | 28 class ConfigurationPolicyProvider; |
28 class DevicePolicyIdentityStrategy; | 29 class DevicePolicyIdentityStrategy; |
29 | 30 |
30 // Manages the lifecycle of browser-global policy infrastructure, such as the | 31 // Manages the lifecycle of browser-global policy infrastructure, such as the |
31 // platform policy providers. | 32 // platform policy providers. |
32 class BrowserPolicyConnector { | 33 class BrowserPolicyConnector { |
33 public: | 34 public: |
34 static BrowserPolicyConnector* Create(); | 35 static BrowserPolicyConnector* Create(); |
35 ~BrowserPolicyConnector(); | 36 ~BrowserPolicyConnector(); |
36 | 37 |
37 ConfigurationPolicyProvider* GetManagedPlatformProvider() const; | 38 ConfigurationPolicyProvider* GetManagedPlatformProvider() const; |
38 ConfigurationPolicyProvider* GetManagedCloudProvider() const; | 39 CloudPolicyProvider* GetManagedCloudProvider() const; |
Mattias Nissler (ping if slow)
2011/05/31 14:14:19
You shouldn't need to now that these are CloudPoli
sfeuz
2011/06/03 08:30:35
Obsolete.
| |
39 ConfigurationPolicyProvider* GetRecommendedPlatformProvider() const; | 40 ConfigurationPolicyProvider* GetRecommendedPlatformProvider() const; |
40 ConfigurationPolicyProvider* GetRecommendedCloudProvider() const; | 41 CloudPolicyProvider* GetRecommendedCloudProvider() const; |
41 | 42 |
42 // Returns a weak pointer to the CloudPolicySubsystem managed by this | 43 // Returns a weak pointer to the CloudPolicySubsystem managed by this |
43 // policy connector, or NULL if no such subsystem exists (i.e. when running | 44 // policy connector, or NULL if no such subsystem exists (i.e. when running |
44 // outside ChromeOS). | 45 // outside ChromeOS). |
45 CloudPolicySubsystem* cloud_policy_subsystem() { | 46 CloudPolicySubsystem* cloud_policy_subsystem() { |
46 return cloud_policy_subsystem_.get(); | 47 return cloud_policy_subsystem_.get(); |
47 } | 48 } |
48 | 49 |
49 // Used to set the credentials stored in the identity strategy associated | 50 // Used to set the credentials stored in the identity strategy associated |
50 // with this policy connector. | 51 // with this policy connector. |
(...skipping 28 matching lines...) Expand all Loading... | |
79 | 80 |
80 // Constructor for tests that allows tests to use fake platform policy | 81 // Constructor for tests that allows tests to use fake platform policy |
81 // providers instead of using the actual ones. | 82 // providers instead of using the actual ones. |
82 BrowserPolicyConnector( | 83 BrowserPolicyConnector( |
83 ConfigurationPolicyProvider* managed_platform_provider, | 84 ConfigurationPolicyProvider* managed_platform_provider, |
84 ConfigurationPolicyProvider* recommended_platform_provider); | 85 ConfigurationPolicyProvider* recommended_platform_provider); |
85 | 86 |
86 // Activates the cloud policy subsystem. | 87 // Activates the cloud policy subsystem. |
87 void Initialize(); | 88 void Initialize(); |
88 | 89 |
90 scoped_ptr<CloudPolicyProvider> managed_cloud_provider_; | |
91 scoped_ptr<CloudPolicyProvider> recommended_cloud_provider_; | |
Joao da Silva
2011/05/31 14:50:23
These are only used on ChromeOS, so how about wrap
sfeuz
2011/06/03 08:30:35
Obsolete.
But I tried to put everything else which
| |
92 | |
89 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; | 93 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; |
90 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; | 94 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; |
91 | 95 |
92 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
93 scoped_ptr<DevicePolicyIdentityStrategy> identity_strategy_; | 97 scoped_ptr<DevicePolicyIdentityStrategy> identity_strategy_; |
94 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; | 98 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; |
95 #endif | 99 #endif |
96 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_; | 100 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_; |
97 | 101 |
98 ScopedRunnableMethodFactory<BrowserPolicyConnector> method_factory_; | 102 ScopedRunnableMethodFactory<BrowserPolicyConnector> method_factory_; |
99 | 103 |
100 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 104 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
101 }; | 105 }; |
102 | 106 |
103 } // namespace policy | 107 } // namespace policy |
104 | 108 |
105 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 109 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
OLD | NEW |