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 "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 pending_supervised_user_id_, | 299 pending_supervised_user_id_, |
300 supervised_users::kChromeOSPasswordData, | 300 supervised_users::kChromeOSPasswordData, |
301 scoped_ptr<base::Value>(info.password_data.DeepCopy()), | 301 scoped_ptr<base::Value>(info.password_data.DeepCopy()), |
302 base::Bind( | 302 base::Bind( |
303 &SupervisedUserRegistrationUtilityImpl:: | 303 &SupervisedUserRegistrationUtilityImpl:: |
304 OnPasswordChangeAcknowledged, | 304 OnPasswordChangeAcknowledged, |
305 weak_ptr_factory_.GetWeakPtr()))); | 305 weak_ptr_factory_.GetWeakPtr()))); |
306 } | 306 } |
307 | 307 |
308 syncer::GetSessionName( | 308 syncer::GetSessionName( |
309 content::BrowserThread::GetBlockingPool(), | 309 content::BrowserThread::GetBlockingPool() |
| 310 ->GetTaskRunnerWithShutdownBehavior( |
| 311 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN).get(), |
310 base::Bind(&SupervisedUserRegistrationUtilityImpl::FetchToken, | 312 base::Bind(&SupervisedUserRegistrationUtilityImpl::FetchToken, |
311 weak_ptr_factory_.GetWeakPtr())); | 313 weak_ptr_factory_.GetWeakPtr())); |
312 } | 314 } |
313 | 315 |
314 void SupervisedUserRegistrationUtilityImpl::CancelPendingRegistration() { | 316 void SupervisedUserRegistrationUtilityImpl::CancelPendingRegistration() { |
315 AbortPendingRegistration( | 317 AbortPendingRegistration( |
316 false, // Don't run the callback. The error will be ignored. | 318 false, // Don't run the callback. The error will be ignored. |
317 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); | 319 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); |
318 } | 320 } |
319 | 321 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 pending_supervised_user_id_); | 410 pending_supervised_user_id_); |
409 } | 411 } |
410 } | 412 } |
411 | 413 |
412 if (run_callback) | 414 if (run_callback) |
413 callback_.Run(error, pending_supervised_user_token_); | 415 callback_.Run(error, pending_supervised_user_token_); |
414 callback_.Reset(); | 416 callback_.Reset(); |
415 } | 417 } |
416 | 418 |
417 } // namespace | 419 } // namespace |
OLD | NEW |