Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_scre en.h" 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 ->GetSessionManagerClient() 209 ->GetSessionManagerClient()
210 ->NotifySupervisedUserCreationFinished(); 210 ->NotifySupervisedUserCreationFinished();
211 controller_->FinishCreation(); 211 controller_->FinishCreation();
212 } 212 }
213 213
214 void SupervisedUserCreationScreen::HideFlow() { 214 void SupervisedUserCreationScreen::HideFlow() {
215 Hide(); 215 Hide();
216 } 216 }
217 217
218 void SupervisedUserCreationScreen::AuthenticateManager( 218 void SupervisedUserCreationScreen::AuthenticateManager(
219 const std::string& manager_id, 219 const AccountId& manager_id,
220 const std::string& manager_password) { 220 const std::string& manager_password) {
221 if (manager_signin_in_progress_) 221 if (manager_signin_in_progress_)
222 return; 222 return;
223 manager_signin_in_progress_ = true; 223 manager_signin_in_progress_ = true;
224 224
225 UserFlow* flow = new SupervisedUserCreationFlow(manager_id); 225 UserFlow* flow = new SupervisedUserCreationFlow(manager_id);
226 ChromeUserManager::Get()->SetUserFlow(AccountId::FromUserEmail(manager_id), 226 ChromeUserManager::Get()->SetUserFlow(manager_id, flow);
227 flow);
228 227
229 // Make sure no two controllers exist at the same time. 228 // Make sure no two controllers exist at the same time.
230 controller_.reset(); 229 controller_.reset();
231 230
232 controller_.reset(new SupervisedUserCreationControllerNew(this, manager_id)); 231 controller_.reset(new SupervisedUserCreationControllerNew(this, manager_id));
233 232
234 UserContext user_context(AccountId::FromUserEmail(manager_id)); 233 UserContext user_context(manager_id);
235 user_context.SetKey(Key(manager_password)); 234 user_context.SetKey(Key(manager_password));
236 ExistingUserController::current_controller()->Login(user_context, 235 ExistingUserController::current_controller()->Login(user_context,
237 SigninSpecifics()); 236 SigninSpecifics());
238 } 237 }
239 238
240 void SupervisedUserCreationScreen::CreateSupervisedUser( 239 void SupervisedUserCreationScreen::CreateSupervisedUser(
241 const base::string16& display_name, 240 const base::string16& display_name,
242 const std::string& supervised_user_password) { 241 const std::string& supervised_user_password) {
243 DCHECK(controller_.get()); 242 DCHECK(controller_.get());
244 int image; 243 int image;
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; 623 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL;
625 } else { 624 } else {
626 NOTREACHED() << "Unexpected image type: " << image_type; 625 NOTREACHED() << "Unexpected image type: " << image_type;
627 } 626 }
628 } 627 }
629 628
630 void SupervisedUserCreationScreen::OnImageAccepted() { 629 void SupervisedUserCreationScreen::OnImageAccepted() {
631 } 630 }
632 631
633 } // namespace chromeos 632 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698