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_CLOUD_POLICY_SUBSYSTEM_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/prefs/pref_member.h" | |
11 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
12 #include "content/common/notification_observer.h" | 11 #include "content/common/notification_observer.h" |
13 #include "net/base/network_change_notifier.h" | 12 #include "net/base/network_change_notifier.h" |
14 | 13 |
15 class PrefService; | 14 class PrefService; |
16 | 15 |
17 namespace policy { | 16 namespace policy { |
18 | 17 |
19 class CloudPolicyCacheBase; | 18 class CloudPolicyCacheBase; |
20 class CloudPolicyController; | 19 class CloudPolicyController; |
21 class CloudPolicyIdentityStrategy; | 20 class CloudPolicyIdentityStrategy; |
22 class ConfigurationPolicyProvider; | |
23 class DeviceManagementService; | 21 class DeviceManagementService; |
24 class DeviceTokenFetcher; | 22 class DeviceTokenFetcher; |
25 class PolicyNotifier; | 23 class PolicyNotifier; |
26 | 24 |
27 // This class is a container for the infrastructure required to support cloud | 25 // This class is a container for the infrastructure required to support cloud |
28 // policy. It glues together the backend, the policy controller and manages the | 26 // policy. It glues together the backend, the policy controller and manages the |
29 // life cycle of the policy providers. | 27 // life cycle of the policy providers. |
30 class CloudPolicySubsystem | 28 class CloudPolicySubsystem |
31 : public NotificationObserver, | 29 : public NotificationObserver, |
32 public net::NetworkChangeNotifier::IPAddressObserver { | 30 public net::NetworkChangeNotifier::IPAddressObserver { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void Shutdown(); | 85 void Shutdown(); |
88 | 86 |
89 // Returns the externally visible state and corresponding error details. | 87 // Returns the externally visible state and corresponding error details. |
90 PolicySubsystemState state(); | 88 PolicySubsystemState state(); |
91 ErrorDetails error_details(); | 89 ErrorDetails error_details(); |
92 | 90 |
93 // Stops all auto-retrying error handling behavior inside the policy | 91 // Stops all auto-retrying error handling behavior inside the policy |
94 // subsystem. | 92 // subsystem. |
95 void StopAutoRetry(); | 93 void StopAutoRetry(); |
96 | 94 |
97 ConfigurationPolicyProvider* GetManagedPolicyProvider(); | |
98 ConfigurationPolicyProvider* GetRecommendedPolicyProvider(); | |
99 | |
100 // Registers cloud policy related prefs. | 95 // Registers cloud policy related prefs. |
101 static void RegisterPrefs(PrefService* pref_service); | 96 static void RegisterPrefs(PrefService* pref_service); |
102 | 97 |
103 // Schedule initialization of the policy backend service. | 98 // Schedule initialization of the policy backend service. |
104 void ScheduleServiceInitialization(int64 delay_milliseconds); | 99 void ScheduleServiceInitialization(int64 delay_milliseconds); |
105 | 100 |
106 private: | 101 private: |
107 friend class TestingCloudPolicySubsystem; | 102 friend class TestingCloudPolicySubsystem; |
108 | 103 |
109 CloudPolicySubsystem(); | 104 CloudPolicySubsystem(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 scoped_ptr<CloudPolicyController> cloud_policy_controller_; | 140 scoped_ptr<CloudPolicyController> cloud_policy_controller_; |
146 | 141 |
147 std::string device_management_url_; | 142 std::string device_management_url_; |
148 | 143 |
149 DISALLOW_COPY_AND_ASSIGN(CloudPolicySubsystem); | 144 DISALLOW_COPY_AND_ASSIGN(CloudPolicySubsystem); |
150 }; | 145 }; |
151 | 146 |
152 } // namespace policy | 147 } // namespace policy |
153 | 148 |
154 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | 149 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ |
OLD | NEW |