Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 // to free the attributes. | 127 // to free the attributes. |
| 128 static void SetInstallAttributesForTesting( | 128 static void SetInstallAttributesForTesting( |
| 129 EnterpriseInstallAttributes* attributes); | 129 EnterpriseInstallAttributes* attributes); |
| 130 static void RemoveInstallAttributesForTesting(); | 130 static void RemoveInstallAttributesForTesting(); |
| 131 | 131 |
| 132 // Registers device refresh rate pref. | 132 // Registers device refresh rate pref. |
| 133 static void RegisterPrefs(PrefRegistrySimple* registry); | 133 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 134 | 134 |
| 135 // DeviceCloudPolicyManagerChromeOS::Observer: | 135 // DeviceCloudPolicyManagerChromeOS::Observer: |
| 136 void OnDeviceCloudPolicyManagerConnected() override; | 136 void OnDeviceCloudPolicyManagerConnected() override; |
| 137 void OnDeviceCloudPolicyManagerDisconnected() override; | |
| 137 | 138 |
| 138 private: | 139 private: |
| 139 // Set the timezone as soon as the policies are available. | 140 // Set the timezone as soon as the policies are available. |
| 140 void SetTimezoneIfPolicyAvailable(); | 141 void SetTimezoneIfPolicyAvailable(); |
| 141 | 142 |
| 143 // Restarts the device cloud policy initializer, because the device's | |
| 144 // registration status is changed from registered to unregistered. | |
|
bartfab (slow)
2014/11/28 13:25:17
Nit: s/is //
davidyu
2014/12/01 17:05:21
Done.
| |
| 145 void RestartDeviceCloudPolicyInitializer(); | |
| 146 | |
| 142 // Components of the device cloud policy implementation. | 147 // Components of the device cloud policy implementation. |
| 143 scoped_ptr<ServerBackedStateKeysBroker> state_keys_broker_; | 148 scoped_ptr<ServerBackedStateKeysBroker> state_keys_broker_; |
| 144 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; | 149 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; |
| 145 scoped_ptr<ConsumerManagementService> consumer_management_service_; | 150 scoped_ptr<ConsumerManagementService> consumer_management_service_; |
| 146 DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager_; | 151 DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager_; |
| 152 PrefService* local_state_; | |
| 147 scoped_ptr<DeviceManagementService> consumer_device_management_service_; | 153 scoped_ptr<DeviceManagementService> consumer_device_management_service_; |
| 148 scoped_ptr<DeviceCloudPolicyInitializer> device_cloud_policy_initializer_; | 154 scoped_ptr<DeviceCloudPolicyInitializer> device_cloud_policy_initializer_; |
| 149 scoped_ptr<DeviceLocalAccountPolicyService> | 155 scoped_ptr<DeviceLocalAccountPolicyService> |
| 150 device_local_account_policy_service_; | 156 device_local_account_policy_service_; |
| 151 scoped_ptr<DeviceCloudPolicyInvalidator> device_cloud_policy_invalidator_; | 157 scoped_ptr<DeviceCloudPolicyInvalidator> device_cloud_policy_invalidator_; |
| 152 | 158 |
| 153 // This policy provider is used on Chrome OS to feed user policy into the | 159 // This policy provider is used on Chrome OS to feed user policy into the |
| 154 // global PolicyService instance. This works by installing the cloud policy | 160 // global PolicyService instance. This works by installing the cloud policy |
| 155 // provider of the primary profile as the delegate of the ProxyPolicyProvider, | 161 // provider of the primary profile as the delegate of the ProxyPolicyProvider, |
| 156 // after login. | 162 // after login. |
| 157 // The provider is owned by the base class; this field is just a typed weak | 163 // The provider is owned by the base class; this field is just a typed weak |
| 158 // pointer to get to the ProxyPolicyProvider at SetUserPolicyDelegate(). | 164 // pointer to get to the ProxyPolicyProvider at SetUserPolicyDelegate(). |
| 159 ProxyPolicyProvider* global_user_cloud_policy_provider_; | 165 ProxyPolicyProvider* global_user_cloud_policy_provider_; |
| 160 | 166 |
| 161 scoped_ptr<AppPackUpdater> app_pack_updater_; | 167 scoped_ptr<AppPackUpdater> app_pack_updater_; |
| 162 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; | 168 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; |
| 163 | 169 |
| 164 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; | 170 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; |
| 165 | 171 |
| 166 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); | 172 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); |
| 167 }; | 173 }; |
| 168 | 174 |
| 169 } // namespace policy | 175 } // namespace policy |
| 170 | 176 |
| 171 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 177 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
| OLD | NEW |