| 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/supervised/supervised_user_creation_cont
roller_new.h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller_new.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/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 DCHECK(creation_context_); | 341 DCHECK(creation_context_); |
| 342 DCHECK_EQ(CRYPTOHOME_CREATED, stage_); | 342 DCHECK_EQ(CRYPTOHOME_CREATED, stage_); |
| 343 | 343 |
| 344 stage_ = DASHBOARD_CREATED; | 344 stage_ = DASHBOARD_CREATED; |
| 345 | 345 |
| 346 if (error.state() == GoogleServiceAuthError::NONE) { | 346 if (error.state() == GoogleServiceAuthError::NONE) { |
| 347 creation_context_->token = token; | 347 creation_context_->token = token; |
| 348 | 348 |
| 349 PostTaskAndReplyWithResult( | 349 PostTaskAndReplyWithResult( |
| 350 base::CreateTaskRunnerWithTraits( | 350 base::CreateTaskRunnerWithTraits( |
| 351 base::TaskTraits() | 351 {base::MayBlock(), base::TaskPriority::BACKGROUND, |
| 352 .MayBlock() | 352 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}) |
| 353 .WithPriority(base::TaskPriority::BACKGROUND) | |
| 354 .WithShutdownBehavior( | |
| 355 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)) | |
| 356 .get(), | 353 .get(), |
| 357 FROM_HERE, | 354 FROM_HERE, |
| 358 base::Bind(&StoreSupervisedUserFiles, creation_context_->token, | 355 base::Bind(&StoreSupervisedUserFiles, creation_context_->token, |
| 359 ProfileHelper::GetProfilePathByUserIdHash( | 356 ProfileHelper::GetProfilePathByUserIdHash( |
| 360 creation_context_->mount_hash)), | 357 creation_context_->mount_hash)), |
| 361 base::Bind( | 358 base::Bind( |
| 362 &SupervisedUserCreationControllerNew::OnSupervisedUserFilesStored, | 359 &SupervisedUserCreationControllerNew::OnSupervisedUserFilesStored, |
| 363 weak_factory_.GetWeakPtr())); | 360 weak_factory_.GetWeakPtr())); |
| 364 } else { | 361 } else { |
| 365 stage_ = STAGE_ERROR; | 362 stage_ = STAGE_ERROR; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 creation_context_->registration_utility.reset(); | 413 creation_context_->registration_utility.reset(); |
| 417 chrome::AttemptUserExit(); | 414 chrome::AttemptUserExit(); |
| 418 } | 415 } |
| 419 | 416 |
| 420 std::string SupervisedUserCreationControllerNew::GetSupervisedUserId() { | 417 std::string SupervisedUserCreationControllerNew::GetSupervisedUserId() { |
| 421 DCHECK(creation_context_); | 418 DCHECK(creation_context_); |
| 422 return creation_context_->local_user_id; | 419 return creation_context_->local_user_id; |
| 423 } | 420 } |
| 424 | 421 |
| 425 } // namespace chromeos | 422 } // namespace chromeos |
| OLD | NEW |