| 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 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" | 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 | 150 |
| 151 policy::DeviceCloudPolicyInitializer::AllowedDeviceModes device_modes; | 151 policy::DeviceCloudPolicyInitializer::AllowedDeviceModes device_modes; |
| 152 device_modes[policy::DEVICE_MODE_ENTERPRISE] = true; | 152 device_modes[policy::DEVICE_MODE_ENTERPRISE] = true; |
| 153 connector->ScheduleServiceInitialization(0); | 153 connector->ScheduleServiceInitialization(0); |
| 154 | 154 |
| 155 policy::DeviceCloudPolicyInitializer* dcp_initializer = | 155 policy::DeviceCloudPolicyInitializer* dcp_initializer = |
| 156 connector->GetDeviceCloudPolicyInitializer(); | 156 connector->GetDeviceCloudPolicyInitializer(); |
| 157 CHECK(dcp_initializer); | 157 CHECK(dcp_initializer); |
| 158 dcp_initializer->StartEnrollment( | 158 dcp_initializer->StartEnrollment( |
| 159 policy::MANAGEMENT_MODE_ENTERPRISE_MANAGED, | 159 connector->device_management_service(), enrollment_config_, token, |
| 160 connector->device_management_service(), | |
| 161 nullptr /* owner_settings_service */, enrollment_config_, token, | |
| 162 device_modes, | 160 device_modes, |
| 163 base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished, | 161 base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished, |
| 164 weak_ptr_factory_.GetWeakPtr())); | 162 weak_ptr_factory_.GetWeakPtr())); |
| 165 } | 163 } |
| 166 | 164 |
| 167 void EnterpriseEnrollmentHelperImpl::GetDeviceAttributeUpdatePermission() { | 165 void EnterpriseEnrollmentHelperImpl::GetDeviceAttributeUpdatePermission() { |
| 168 // TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed. | 166 // TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed. |
| 169 LOG(WARNING) << "Get device attribute update permission"; | 167 LOG(WARNING) << "Get device attribute update permission"; |
| 170 policy::BrowserPolicyConnectorChromeOS* connector = | 168 policy::BrowserPolicyConnectorChromeOS* connector = |
| 171 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 169 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 EnrollmentUMA(sample, enrollment_config_.mode); | 413 EnrollmentUMA(sample, enrollment_config_.mode); |
| 416 } | 414 } |
| 417 | 415 |
| 418 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared( | 416 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared( |
| 419 const base::Closure& callback) { | 417 const base::Closure& callback) { |
| 420 auth_data_cleared_ = true; | 418 auth_data_cleared_ = true; |
| 421 callback.Run(); | 419 callback.Run(); |
| 422 } | 420 } |
| 423 | 421 |
| 424 } // namespace chromeos | 422 } // namespace chromeos |
| OLD | NEW |