OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | |
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | |
7 #pragma once | |
8 | |
9 #include "base/scoped_ptr.h" | |
10 #include "chrome/browser/prefs/pref_member.h" | |
11 #include "chrome/common/notification_observer.h" | |
12 | |
13 class FilePath; | |
14 class PrefService; | |
15 class URLRequestContextGetter; | |
16 | |
17 namespace policy { | |
18 | |
19 class CloudPolicyCache; | |
20 class CloudPolicyController; | |
21 class CloudPolicyIdentityStrategy; | |
22 class ConfigurationPolicyProvider; | |
23 class DeviceManagementService; | |
24 class DeviceTokenFetcher; | |
25 | |
26 // This class is a container for the infrastructure required to support cloud | |
27 // policy. It glues together the backend, the policy client and manages the | |
Mattias Nissler (ping if slow)
2011/02/15 10:15:16
s/policy client/policy controller/
Jakob Kummerow
2011/02/21 12:12:15
Done.
| |
28 // life cycle of the policy providers. | |
29 class CloudPolicySubsystem : public NotificationObserver { | |
30 public: | |
31 CloudPolicySubsystem(const FilePath& policy_cache_file, | |
32 CloudPolicyIdentityStrategy* identity_strategy); | |
33 virtual ~CloudPolicySubsystem(); | |
34 | |
35 // Initializes the context. | |
gfeher
2011/02/15 13:17:01
context->subsystem
Jakob Kummerow
2011/02/21 12:12:15
Done.
| |
36 void Initialize(PrefService* prefs, | |
37 const char* refresh_rate_pref_name, | |
38 URLRequestContextGetter* request_context); | |
39 | |
40 // Shuts the context down. This must be called before threading and network | |
gfeher
2011/02/14 17:28:50
context->subsystem?
Jakob Kummerow
2011/02/21 12:12:15
Done.
| |
41 // infrastructure goes away. | |
42 void Shutdown(); | |
43 | |
44 ConfigurationPolicyProvider* GetManagedPolicyProvider(); | |
45 ConfigurationPolicyProvider* GetRecommendedPolicyProvider(); | |
46 | |
47 private: | |
48 // Updates the policy provider with a new refresh rate value. | |
49 void UpdatePolicyRefreshRate(); | |
50 | |
51 // NotificationObserver overrides. | |
52 virtual void Observe(NotificationType type, | |
53 const NotificationSource& source, | |
54 const NotificationDetails& details); | |
55 | |
56 // The pref service that controls the refresh rate. | |
57 PrefService* prefs_; | |
58 | |
59 // Tracks the pref value for the policy refresh rate. | |
60 IntegerPrefMember policy_refresh_rate_; | |
61 | |
62 // Cloud policy infrastructure stuff. | |
63 scoped_ptr<DeviceManagementService> device_management_service_; | |
64 scoped_ptr<DeviceTokenFetcher> device_token_fetcher_; | |
65 scoped_ptr<CloudPolicyCache> cloud_policy_cache_; | |
66 scoped_ptr<CloudPolicyController> cloud_policy_controller_; | |
Mattias Nissler (ping if slow)
2011/02/15 10:15:16
DISALLOW_COPY_AND_ASSIGN
Jakob Kummerow
2011/02/21 12:12:15
Done.
| |
67 }; | |
68 | |
69 } // namespace policy | |
70 | |
71 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | |
OLD | NEW |