Chromium Code Reviews| 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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 policy::DeviceCloudPolicyInitializer::AllowedDeviceModes device_modes; | 161 policy::DeviceCloudPolicyInitializer::AllowedDeviceModes device_modes; |
| 162 device_modes[policy::DEVICE_MODE_ENTERPRISE] = true; | 162 device_modes[policy::DEVICE_MODE_ENTERPRISE] = true; |
| 163 connector->ScheduleServiceInitialization(0); | 163 connector->ScheduleServiceInitialization(0); |
| 164 | 164 |
| 165 policy::DeviceCloudPolicyInitializer* dcp_initializer = | 165 policy::DeviceCloudPolicyInitializer* dcp_initializer = |
| 166 connector->GetDeviceCloudPolicyInitializer(); | 166 connector->GetDeviceCloudPolicyInitializer(); |
| 167 CHECK(dcp_initializer); | 167 CHECK(dcp_initializer); |
| 168 dcp_initializer->StartEnrollment( | 168 dcp_initializer->StartEnrollment( |
| 169 policy::MANAGEMENT_MODE_ENTERPRISE_MANAGED, | 169 policy::MANAGEMENT_MODE_ENTERPRISE_MANAGED, |
| 170 connector->device_management_service(), | 170 connector->device_management_service(), |
| 171 token, | 171 nullptr /* owner_settings_service */, token, is_auto_enrollment(), |
|
davidyu
2014/12/03 16:06:04
Put each parameter at its own line.
ygorshenin1
2014/12/04 10:21:47
This formatting is made by git cl format (actually
davidyu
2014/12/04 10:29:24
Ah, okay, then.
| |
| 172 is_auto_enrollment(), | |
| 173 device_modes, | 172 device_modes, |
| 174 base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished, | 173 base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished, |
| 175 weak_ptr_factory_.GetWeakPtr())); | 174 weak_ptr_factory_.GetWeakPtr())); |
| 176 } | 175 } |
| 177 | 176 |
| 178 void EnterpriseEnrollmentHelperImpl::OnTokenFetched( | 177 void EnterpriseEnrollmentHelperImpl::OnTokenFetched( |
| 179 size_t fetcher_index, | 178 size_t fetcher_index, |
| 180 const std::string& token, | 179 const std::string& token, |
| 181 const GoogleServiceAuthError& error) { | 180 const GoogleServiceAuthError& error) { |
| 182 CHECK_LT(fetcher_index, oauth_fetchers_.size()); | 181 CHECK_LT(fetcher_index, oauth_fetchers_.size()); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 386 std::vector<base::Closure> callbacks_to_run; | 385 std::vector<base::Closure> callbacks_to_run; |
| 387 callbacks_to_run.swap(auth_clear_callbacks_); | 386 callbacks_to_run.swap(auth_clear_callbacks_); |
| 388 for (std::vector<base::Closure>::iterator callback(callbacks_to_run.begin()); | 387 for (std::vector<base::Closure>::iterator callback(callbacks_to_run.begin()); |
| 389 callback != callbacks_to_run.end(); | 388 callback != callbacks_to_run.end(); |
| 390 ++callback) { | 389 ++callback) { |
| 391 callback->Run(); | 390 callback->Run(); |
| 392 } | 391 } |
| 393 } | 392 } |
| 394 | 393 |
| 395 } // namespace chromeos | 394 } // namespace chromeos |
| OLD | NEW |