| 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_DEVICE_CLOUD_POLICY_INITIALIZER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" | 16 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" |
| 17 #include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h" | 17 #include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h" |
| 18 #include "components/policy/core/common/cloud/cloud_policy_client.h" | 18 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 19 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 19 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 20 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 20 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 21 | 21 |
| 22 class PrefService; | 22 class PrefService; |
| 23 | 23 |
| 24 namespace base { | 24 namespace base { |
| 25 class SequencedTaskRunner; | 25 class SequencedTaskRunner; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace chromeos { | 28 namespace chromeos { |
| 29 class DeviceSettingsService; | 29 class DeviceSettingsService; |
| 30 class OwnerSettingsServiceChromeOS; |
| 30 } | 31 } |
| 31 | 32 |
| 32 namespace policy { | 33 namespace policy { |
| 33 | 34 |
| 34 class DeviceCloudPolicyManagerChromeOS; | 35 class DeviceCloudPolicyManagerChromeOS; |
| 35 class DeviceCloudPolicyStoreChromeOS; | 36 class DeviceCloudPolicyStoreChromeOS; |
| 36 class DeviceManagementService; | 37 class DeviceManagementService; |
| 37 class EnrollmentHandlerChromeOS; | 38 class EnrollmentHandlerChromeOS; |
| 38 class EnterpriseInstallAttributes; | 39 class EnterpriseInstallAttributes; |
| 39 | 40 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 68 // Starts enrollment or re-enrollment. Once the enrollment process completes, | 69 // Starts enrollment or re-enrollment. Once the enrollment process completes, |
| 69 // |enrollment_callback| is invoked and gets passed the status of the | 70 // |enrollment_callback| is invoked and gets passed the status of the |
| 70 // operation. | 71 // operation. |
| 71 // |allowed_modes| specifies acceptable DEVICE_MODE_* constants for | 72 // |allowed_modes| specifies acceptable DEVICE_MODE_* constants for |
| 72 // enrollment. | 73 // enrollment. |
| 73 // |management_mode| should be either MANAGEMENT_MODE_ENTERPRISE or | 74 // |management_mode| should be either MANAGEMENT_MODE_ENTERPRISE or |
| 74 // MANAGEMENT_MODE_CONSUMER. | 75 // MANAGEMENT_MODE_CONSUMER. |
| 75 virtual void StartEnrollment( | 76 virtual void StartEnrollment( |
| 76 ManagementMode management_mode, | 77 ManagementMode management_mode, |
| 77 DeviceManagementService* device_management_service, | 78 DeviceManagementService* device_management_service, |
| 79 chromeos::OwnerSettingsServiceChromeOS* owner_settings_service, |
| 78 const std::string& auth_token, | 80 const std::string& auth_token, |
| 79 bool is_auto_enrollment, | 81 bool is_auto_enrollment, |
| 80 const AllowedDeviceModes& allowed_modes, | 82 const AllowedDeviceModes& allowed_modes, |
| 81 const EnrollmentCallback& enrollment_callback); | 83 const EnrollmentCallback& enrollment_callback); |
| 82 | 84 |
| 83 // Checks whether enterprise enrollment should be a regular step during OOBE. | 85 // Checks whether enterprise enrollment should be a regular step during OOBE. |
| 84 bool ShouldAutoStartEnrollment() const; | 86 bool ShouldAutoStartEnrollment() const; |
| 85 | 87 |
| 86 // Checks whether enterprise enrollment recovery is required. | 88 // Checks whether enterprise enrollment recovery is required. |
| 87 bool ShouldRecoverEnrollment() const; | 89 bool ShouldRecoverEnrollment() const; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 scoped_ptr<EnrollmentHandlerChromeOS> enrollment_handler_; | 129 scoped_ptr<EnrollmentHandlerChromeOS> enrollment_handler_; |
| 128 | 130 |
| 129 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; | 131 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; |
| 130 | 132 |
| 131 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyInitializer); | 133 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyInitializer); |
| 132 }; | 134 }; |
| 133 | 135 |
| 134 } // namespace policy | 136 } // namespace policy |
| 135 | 137 |
| 136 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ | 138 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ |
| OLD | NEW |