| OLD | NEW |
| 1 // Copyright (c) 2012 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_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 class PrefRegistrySimple; | 31 class PrefRegistrySimple; |
| 32 class PrefService; | 32 class PrefService; |
| 33 | 33 |
| 34 namespace policy { | 34 namespace policy { |
| 35 | 35 |
| 36 class DeviceCloudPolicyStoreChromeOS; | 36 class DeviceCloudPolicyStoreChromeOS; |
| 37 class EnterpriseInstallAttributes; | 37 class EnterpriseInstallAttributes; |
| 38 class HeartbeatScheduler; | 38 class HeartbeatScheduler; |
| 39 class StatusUploader; | 39 class StatusUploader; |
| 40 class SystemLogUploader; |
| 40 | 41 |
| 41 // CloudPolicyManager specialization for device policy on Chrome OS. | 42 // CloudPolicyManager specialization for device policy on Chrome OS. |
| 42 class DeviceCloudPolicyManagerChromeOS : public CloudPolicyManager { | 43 class DeviceCloudPolicyManagerChromeOS : public CloudPolicyManager { |
| 43 public: | 44 public: |
| 44 class Observer { | 45 class Observer { |
| 45 public: | 46 public: |
| 46 // Invoked when the device cloud policy manager connects. | 47 // Invoked when the device cloud policy manager connects. |
| 47 virtual void OnDeviceCloudPolicyManagerConnected() = 0; | 48 virtual void OnDeviceCloudPolicyManagerConnected() = 0; |
| 48 // Invoked when the device cloud policy manager disconnects. | 49 // Invoked when the device cloud policy manager disconnects. |
| 49 virtual void OnDeviceCloudPolicyManagerDisconnected() = 0; | 50 virtual void OnDeviceCloudPolicyManagerDisconnected() = 0; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 116 |
| 116 // Initializes requisition settings at OOBE with values from VPD. | 117 // Initializes requisition settings at OOBE with values from VPD. |
| 117 void InitializeRequisition(); | 118 void InitializeRequisition(); |
| 118 | 119 |
| 119 void NotifyConnected(); | 120 void NotifyConnected(); |
| 120 void NotifyDisconnected(); | 121 void NotifyDisconnected(); |
| 121 | 122 |
| 122 // Factory function to create the StatusUploader. | 123 // Factory function to create the StatusUploader. |
| 123 void CreateStatusUploader(); | 124 void CreateStatusUploader(); |
| 124 | 125 |
| 126 // Factory function to create the SystemLogUploader. |
| 127 void CreateSystemLogUploader(); |
| 128 |
| 125 // Points to the same object as the base CloudPolicyManager::store(), but with | 129 // Points to the same object as the base CloudPolicyManager::store(), but with |
| 126 // actual device policy specific type. | 130 // actual device policy specific type. |
| 127 scoped_ptr<DeviceCloudPolicyStoreChromeOS> device_store_; | 131 scoped_ptr<DeviceCloudPolicyStoreChromeOS> device_store_; |
| 128 ServerBackedStateKeysBroker* state_keys_broker_; | 132 ServerBackedStateKeysBroker* state_keys_broker_; |
| 129 | 133 |
| 130 // Helper object that handles updating the server with our current device | 134 // Helper object that handles updating the server with our current device |
| 131 // state. | 135 // state. |
| 132 scoped_ptr<StatusUploader> status_uploader_; | 136 scoped_ptr<StatusUploader> status_uploader_; |
| 133 | 137 |
| 138 // Helper object that handles uploading system logs to the server. |
| 139 scoped_ptr<SystemLogUploader> syslog_uploader_; |
| 140 |
| 134 // Helper object that handles sending heartbeats over the GCM channel to | 141 // Helper object that handles sending heartbeats over the GCM channel to |
| 135 // the server, to monitor connectivity. | 142 // the server, to monitor connectivity. |
| 136 scoped_ptr<HeartbeatScheduler> heartbeat_scheduler_; | 143 scoped_ptr<HeartbeatScheduler> heartbeat_scheduler_; |
| 137 | 144 |
| 138 // The TaskRunner used to do device status uploads. | 145 // The TaskRunner used to do device status and log uploads. |
| 139 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 146 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 140 | 147 |
| 141 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; | 148 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; |
| 142 | 149 |
| 143 // PrefService instance to read the policy refresh rate from. | 150 // PrefService instance to read the policy refresh rate from. |
| 144 PrefService* local_state_; | 151 PrefService* local_state_; |
| 145 | 152 |
| 146 scoped_ptr<chromeos::attestation::AttestationPolicyObserver> | 153 scoped_ptr<chromeos::attestation::AttestationPolicyObserver> |
| 147 attestation_policy_observer_; | 154 attestation_policy_observer_; |
| 148 | 155 |
| 149 base::ObserverList<Observer, true> observers_; | 156 base::ObserverList<Observer, true> observers_; |
| 150 | 157 |
| 151 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyManagerChromeOS); | 158 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyManagerChromeOS); |
| 152 }; | 159 }; |
| 153 | 160 |
| 154 } // namespace policy | 161 } // namespace policy |
| 155 | 162 |
| 156 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H
_ | 163 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H
_ |
| OLD | NEW |