Chromium Code Reviews| Index: chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc |
| diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc b/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc |
| index f8fc7aff0857814a681ed6ce21e21bc4333c5553..ba96073887f6bb07bad6cdb61735afe6697fc1d3 100644 |
| --- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc |
| +++ b/chrome/browser/chromeos/login/managed/locally_managed_user_creation_controller.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/threading/sequenced_worker_pool.h" |
| #include "base/values.h" |
| #include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h" |
| +#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h" |
| #include "chrome/browser/chromeos/login/mount_manager.h" |
| #include "chrome/browser/chromeos/login/supervised_user_manager.h" |
| #include "chrome/browser/chromeos/login/user.h" |
| @@ -149,10 +150,22 @@ void LocallyManagedUserCreationController::StartCreation() { |
| creation_context_->display_name); |
| manager->SetCreationTransactionUserId(creation_context_->local_user_id); |
| + SupervisedUserAuthentication* authentication = |
| + manager->GetSupervisedUserAuthentication(); |
| + if (authentication->FillDataForNewUser( |
| + creation_context_->local_user_id, |
|
Nikita (slow)
2013/12/09 16:42:16
nit: Please move parameter to prev line and align
Denis Kuznetsov (DE-MUC)
2013/12/12 19:45:24
Done.
|
| + creation_context_->password, |
| + &creation_context_->password_data)) { |
| + authentication->StorePasswordData(creation_context_->local_user_id, |
| + creation_context_->password_data); |
| + } |
| VLOG(1) << "Creating cryptohome"; |
| authenticator_ = new ManagedUserAuthenticator(this); |
| - authenticator_->AuthenticateToCreate(creation_context_->local_user_id, |
| - creation_context_->password); |
| + authenticator_->AuthenticateToCreate( |
|
Nikita (slow)
2013/12/09 16:42:16
nit: Can you please change alignment in the same w
Denis Kuznetsov (DE-MUC)
2013/12/12 19:45:24
Done.
|
| + creation_context_->local_user_id, |
| + authentication->TransformPassword( |
| + creation_context_->local_user_id, |
| + creation_context_->password)); |
| } |
| void LocallyManagedUserCreationController::OnAuthenticationFailure( |
| @@ -190,9 +203,15 @@ void LocallyManagedUserCreationController::OnMountSuccess( |
| } |
| VLOG(1) << "Adding master key"; |
| - authenticator_->AddMasterKey(creation_context_->local_user_id, |
| - creation_context_->password, |
| - creation_context_->master_key); |
| + SupervisedUserAuthentication* authentication = UserManager::Get()-> |
| + GetSupervisedUserManager()->GetSupervisedUserAuthentication(); |
| + |
| + authenticator_->AddMasterKey( |
|
Nikita (slow)
2013/12/09 16:42:16
nit: Can you please change alignment in the same w
Denis Kuznetsov (DE-MUC)
2013/12/12 19:45:24
Done.
|
| + creation_context_->local_user_id, |
| + authentication->TransformPassword( |
| + creation_context_->local_user_id, |
| + creation_context_->password), |
| + creation_context_->master_key); |
| } |
| void LocallyManagedUserCreationController::OnAddKeySuccess() { |
| @@ -201,6 +220,7 @@ void LocallyManagedUserCreationController::OnAddKeySuccess() { |
| creation_context_->manager_profile); |
| VLOG(1) << "Creating user on server"; |
| + // TODO(antrim) : add password data to sync once API is ready. |
|
Nikita (slow)
2013/12/09 16:42:16
nit: Bug # is missing. Just to make sure that we'r
Denis Kuznetsov (DE-MUC)
2013/12/12 19:45:24
Done.
|
| ManagedUserRegistrationInfo info(creation_context_->display_name, |
| creation_context_->avatar_index); |
| info.master_key = creation_context_->master_key; |