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/supervised_user/legacy/supervised_user_registration_uti
lity.h" | 5 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 supervised_user_shared_settings_service_, pending_supervised_user_id_, | 296 supervised_user_shared_settings_service_, pending_supervised_user_id_, |
297 supervised_users::kChromeOSPasswordData, | 297 supervised_users::kChromeOSPasswordData, |
298 std::unique_ptr<base::Value>(info.password_data.DeepCopy()), | 298 std::unique_ptr<base::Value>(info.password_data.DeepCopy()), |
299 base::Bind(&SupervisedUserRegistrationUtilityImpl:: | 299 base::Bind(&SupervisedUserRegistrationUtilityImpl:: |
300 OnPasswordChangeAcknowledged, | 300 OnPasswordChangeAcknowledged, |
301 weak_ptr_factory_.GetWeakPtr()))); | 301 weak_ptr_factory_.GetWeakPtr()))); |
302 } | 302 } |
303 | 303 |
304 syncer::GetSessionName( | 304 syncer::GetSessionName( |
305 base::CreateTaskRunnerWithTraits( | 305 base::CreateTaskRunnerWithTraits( |
306 base::TaskTraits() | 306 {base::MayBlock(), base::TaskPriority::BACKGROUND, |
307 .MayBlock() | 307 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}) |
308 .WithPriority(base::TaskPriority::BACKGROUND) | |
309 .WithShutdownBehavior( | |
310 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)) | |
311 .get(), | 308 .get(), |
312 base::Bind(&SupervisedUserRegistrationUtilityImpl::FetchToken, | 309 base::Bind(&SupervisedUserRegistrationUtilityImpl::FetchToken, |
313 weak_ptr_factory_.GetWeakPtr())); | 310 weak_ptr_factory_.GetWeakPtr())); |
314 } | 311 } |
315 | 312 |
316 void SupervisedUserRegistrationUtilityImpl::CancelPendingRegistration() { | 313 void SupervisedUserRegistrationUtilityImpl::CancelPendingRegistration() { |
317 AbortPendingRegistration( | 314 AbortPendingRegistration( |
318 false, // Don't run the callback. The error will be ignored. | 315 false, // Don't run the callback. The error will be ignored. |
319 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); | 316 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); |
320 } | 317 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 pending_supervised_user_id_); | 407 pending_supervised_user_id_); |
411 } | 408 } |
412 } | 409 } |
413 | 410 |
414 if (run_callback) | 411 if (run_callback) |
415 callback_.Run(error, pending_supervised_user_token_); | 412 callback_.Run(error, pending_supervised_user_token_); |
416 callback_.Reset(); | 413 callback_.Reset(); |
417 } | 414 } |
418 | 415 |
419 } // namespace | 416 } // namespace |
OLD | NEW |