| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "chrome/browser/policy/chrome_browser_policy_connector.h" | 14 #include "chrome/browser/policy/chrome_browser_policy_connector.h" |
| 15 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 15 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 16 | 16 |
| 17 class PrefRegistrySimple; | 17 class PrefRegistrySimple; |
| 18 class PrefService; | 18 class PrefService; |
| 19 | 19 |
| 20 namespace net { | 20 namespace net { |
| 21 class URLRequestContextGetter; | 21 class URLRequestContextGetter; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace policy { | 24 namespace policy { |
| 25 | 25 |
| 26 class AppPackUpdater; | |
| 27 class ConsumerManagementService; | 26 class ConsumerManagementService; |
| 28 class DeviceCloudPolicyInitializer; | 27 class DeviceCloudPolicyInitializer; |
| 29 class DeviceCloudPolicyInvalidator; | 28 class DeviceCloudPolicyInvalidator; |
| 30 class DeviceCloudPolicyManagerChromeOS; | 29 class DeviceCloudPolicyManagerChromeOS; |
| 31 class DeviceLocalAccountPolicyService; | 30 class DeviceLocalAccountPolicyService; |
| 32 class DeviceManagementService; | 31 class DeviceManagementService; |
| 33 class EnterpriseInstallAttributes; | 32 class EnterpriseInstallAttributes; |
| 34 class NetworkConfigurationUpdater; | 33 class NetworkConfigurationUpdater; |
| 35 class ProxyPolicyProvider; | 34 class ProxyPolicyProvider; |
| 36 class ServerBackedStateKeysBroker; | 35 class ServerBackedStateKeysBroker; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 64 // Returns the device mode. For ChromeOS this function will return the mode | 63 // Returns the device mode. For ChromeOS this function will return the mode |
| 65 // stored in the lockbox, or DEVICE_MODE_CONSUMER if the lockbox has been | 64 // stored in the lockbox, or DEVICE_MODE_CONSUMER if the lockbox has been |
| 66 // locked empty, or DEVICE_MODE_UNKNOWN if the device has not been owned yet. | 65 // locked empty, or DEVICE_MODE_UNKNOWN if the device has not been owned yet. |
| 67 // For other OSes the function will always return DEVICE_MODE_CONSUMER. | 66 // For other OSes the function will always return DEVICE_MODE_CONSUMER. |
| 68 DeviceMode GetDeviceMode(); | 67 DeviceMode GetDeviceMode(); |
| 69 | 68 |
| 70 // Works out the user affiliation by checking the given |user_name| against | 69 // Works out the user affiliation by checking the given |user_name| against |
| 71 // the installation attributes. | 70 // the installation attributes. |
| 72 UserAffiliation GetUserAffiliation(const std::string& user_name); | 71 UserAffiliation GetUserAffiliation(const std::string& user_name); |
| 73 | 72 |
| 74 AppPackUpdater* GetAppPackUpdater(); | |
| 75 | |
| 76 DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() { | 73 DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() { |
| 77 return device_cloud_policy_manager_; | 74 return device_cloud_policy_manager_; |
| 78 } | 75 } |
| 79 | 76 |
| 80 DeviceCloudPolicyInitializer* GetDeviceCloudPolicyInitializer() { | 77 DeviceCloudPolicyInitializer* GetDeviceCloudPolicyInitializer() { |
| 81 return device_cloud_policy_initializer_.get(); | 78 return device_cloud_policy_initializer_.get(); |
| 82 } | 79 } |
| 83 | 80 |
| 84 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() { | 81 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() { |
| 85 return device_local_account_policy_service_.get(); | 82 return device_local_account_policy_service_.get(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 scoped_ptr<DeviceCloudPolicyInvalidator> device_cloud_policy_invalidator_; | 140 scoped_ptr<DeviceCloudPolicyInvalidator> device_cloud_policy_invalidator_; |
| 144 | 141 |
| 145 // This policy provider is used on Chrome OS to feed user policy into the | 142 // This policy provider is used on Chrome OS to feed user policy into the |
| 146 // global PolicyService instance. This works by installing the cloud policy | 143 // global PolicyService instance. This works by installing the cloud policy |
| 147 // provider of the primary profile as the delegate of the ProxyPolicyProvider, | 144 // provider of the primary profile as the delegate of the ProxyPolicyProvider, |
| 148 // after login. | 145 // after login. |
| 149 // The provider is owned by the base class; this field is just a typed weak | 146 // The provider is owned by the base class; this field is just a typed weak |
| 150 // pointer to get to the ProxyPolicyProvider at SetUserPolicyDelegate(). | 147 // pointer to get to the ProxyPolicyProvider at SetUserPolicyDelegate(). |
| 151 ProxyPolicyProvider* global_user_cloud_policy_provider_; | 148 ProxyPolicyProvider* global_user_cloud_policy_provider_; |
| 152 | 149 |
| 153 scoped_ptr<AppPackUpdater> app_pack_updater_; | |
| 154 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; | 150 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; |
| 155 | 151 |
| 156 scoped_ptr<DeviceManagementService> consumer_device_management_service_; | 152 scoped_ptr<DeviceManagementService> consumer_device_management_service_; |
| 157 scoped_ptr<ConsumerManagementService> consumer_management_service_; | 153 scoped_ptr<ConsumerManagementService> consumer_management_service_; |
| 158 | 154 |
| 159 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; | 155 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; |
| 160 | 156 |
| 161 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); | 157 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); |
| 162 }; | 158 }; |
| 163 | 159 |
| 164 } // namespace policy | 160 } // namespace policy |
| 165 | 161 |
| 166 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 162 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
| OLD | NEW |