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