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_store.h" | 20 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
20 #include "policy/proto/device_management_backend.pb.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 } | 30 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 virtual ~DeviceCloudPolicyInitializer(); | 63 virtual ~DeviceCloudPolicyInitializer(); |
64 | 64 |
65 virtual void Init(); | 65 virtual void Init(); |
66 virtual void Shutdown(); | 66 virtual void Shutdown(); |
67 | 67 |
68 // Starts enrollment or re-enrollment. Once the enrollment process completes, | 68 // Starts enrollment or re-enrollment. Once the enrollment process completes, |
69 // |enrollment_callback| is invoked and gets passed the status of the | 69 // |enrollment_callback| is invoked and gets passed the status of the |
70 // operation. | 70 // operation. |
71 // |allowed_modes| specifies acceptable DEVICE_MODE_* constants for | 71 // |allowed_modes| specifies acceptable DEVICE_MODE_* constants for |
72 // enrollment. | 72 // enrollment. |
73 // |management_mode| should be either ENTERPRISE_MANAGED or CONSUMER_MANAGED. | 73 // |management_mode| should be either MANAGEMENT_MODE_ENTERPRISE or |
| 74 // MANAGEMENT_MODE_CONSUMER. |
74 virtual void StartEnrollment( | 75 virtual void StartEnrollment( |
75 enterprise_management::PolicyData::ManagementMode management_mode, | 76 ManagementMode management_mode, |
76 DeviceManagementService* device_management_service, | 77 DeviceManagementService* device_management_service, |
77 const std::string& auth_token, | 78 const std::string& auth_token, |
78 bool is_auto_enrollment, | 79 bool is_auto_enrollment, |
79 const AllowedDeviceModes& allowed_modes, | 80 const AllowedDeviceModes& allowed_modes, |
80 const EnrollmentCallback& enrollment_callback); | 81 const EnrollmentCallback& enrollment_callback); |
81 | 82 |
82 // Checks whether enterprise enrollment should be a regular step during OOBE. | 83 // Checks whether enterprise enrollment should be a regular step during OOBE. |
83 bool ShouldAutoStartEnrollment() const; | 84 bool ShouldAutoStartEnrollment() const; |
84 | 85 |
85 // Checks whether enterprise enrollment recovery is required. | 86 // Checks whether enterprise enrollment recovery is required. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 scoped_ptr<EnrollmentHandlerChromeOS> enrollment_handler_; | 127 scoped_ptr<EnrollmentHandlerChromeOS> enrollment_handler_; |
127 | 128 |
128 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; | 129 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; |
129 | 130 |
130 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyInitializer); | 131 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyInitializer); |
131 }; | 132 }; |
132 | 133 |
133 } // namespace policy | 134 } // namespace policy |
134 | 135 |
135 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ | 136 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_INITIALIZER_H_ |
OLD | NEW |