OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/managed/locally_managed_user_creation_sc
reen.h" | 5 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_sc
reen.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 SupervisedUserAuthentication* authentication = | 195 SupervisedUserAuthentication* authentication = |
196 UserManager::Get()->GetSupervisedUserManager()->GetAuthentication(); | 196 UserManager::Get()->GetSupervisedUserManager()->GetAuthentication(); |
197 | 197 |
198 if (authentication->GetStableSchema() == | 198 if (authentication->GetStableSchema() == |
199 SupervisedUserAuthentication::SCHEMA_PLAIN) { | 199 SupervisedUserAuthentication::SCHEMA_PLAIN) { |
200 controller_.reset(new ManagedUserCreationControllerOld(this, manager_id)); | 200 controller_.reset(new ManagedUserCreationControllerOld(this, manager_id)); |
201 } else { | 201 } else { |
202 controller_.reset(new ManagedUserCreationControllerNew(this, manager_id)); | 202 controller_.reset(new ManagedUserCreationControllerNew(this, manager_id)); |
203 } | 203 } |
204 | 204 |
205 ExistingUserController::current_controller()-> | 205 UserContext user_context(manager_id); |
206 Login(UserContext(manager_id, | 206 user_context.SetPassword(manager_password); |
207 manager_password, | 207 ExistingUserController::current_controller()->Login(user_context); |
208 std::string() /* auth_code */)); | |
209 } | 208 } |
210 | 209 |
211 void LocallyManagedUserCreationScreen::CreateManagedUser( | 210 void LocallyManagedUserCreationScreen::CreateManagedUser( |
212 const base::string16& display_name, | 211 const base::string16& display_name, |
213 const std::string& managed_user_password) { | 212 const std::string& managed_user_password) { |
214 DCHECK(controller_.get()); | 213 DCHECK(controller_.get()); |
215 int image; | 214 int image; |
216 if (selected_image_ == User::kExternalImageIndex) | 215 if (selected_image_ == User::kExternalImageIndex) |
217 // TODO(dzhioev): crbug/249660 | 216 // TODO(dzhioev): crbug/249660 |
218 image = ManagedUserCreationController::kDummyAvatarIndex; | 217 image = ManagedUserCreationController::kDummyAvatarIndex; |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 selected_image_ = User::kExternalImageIndex; | 591 selected_image_ = User::kExternalImageIndex; |
593 } else { | 592 } else { |
594 NOTREACHED() << "Unexpected image type: " << image_type; | 593 NOTREACHED() << "Unexpected image type: " << image_type; |
595 } | 594 } |
596 } | 595 } |
597 | 596 |
598 void LocallyManagedUserCreationScreen::OnImageAccepted() { | 597 void LocallyManagedUserCreationScreen::OnImageAccepted() { |
599 } | 598 } |
600 | 599 |
601 } // namespace chromeos | 600 } // namespace chromeos |
OLD | NEW |