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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc

Issue 566423002: Disable repeated signin as manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 6 years, 3 months 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
« no previous file with comments | « chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/webui/chromeos/login/supervised_user_creation_screen _handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen _handler.h"
6 6
7 #include "ash/audio/sounds.h" 7 #include "ash/audio/sounds.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" 10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 IDS_CREATE_SUPERVISED_USER_CREATION_CREATION_PROGRESS_MESSAGE)); 379 IDS_CREATE_SUPERVISED_USER_CREATION_CREATION_PROGRESS_MESSAGE));
380 380
381 delegate_->ImportSupervisedUserWithPassword(user_id, password); 381 delegate_->ImportSupervisedUserWithPassword(user_id, password);
382 } 382 }
383 383
384 void SupervisedUserCreationScreenHandler::HandleAuthenticateManager( 384 void SupervisedUserCreationScreenHandler::HandleAuthenticateManager(
385 const std::string& raw_manager_username, 385 const std::string& raw_manager_username,
386 const std::string& manager_password) { 386 const std::string& manager_password) {
387 const std::string manager_username = 387 const std::string manager_username =
388 gaia::SanitizeEmail(raw_manager_username); 388 gaia::SanitizeEmail(raw_manager_username);
389
390 UserFlow* flow = new SupervisedUserCreationFlow(manager_username);
391 ChromeUserManager::Get()->SetUserFlow(manager_username, flow);
392
393 delegate_->AuthenticateManager(manager_username, manager_password); 389 delegate_->AuthenticateManager(manager_username, manager_password);
394 } 390 }
395 391
396 // TODO(antrim) : this is an explicit code duplications with UserImageScreen. 392 // TODO(antrim) : this is an explicit code duplications with UserImageScreen.
397 // It should be removed by issue 251179. 393 // It should be removed by issue 251179.
398 void SupervisedUserCreationScreenHandler::HandleGetImages() { 394 void SupervisedUserCreationScreenHandler::HandleGetImages() {
399 base::ListValue image_urls; 395 base::ListValue image_urls;
400 for (int i = user_manager::kFirstDefaultImageIndex; 396 for (int i = user_manager::kFirstDefaultImageIndex;
401 i < user_manager::kDefaultImagesCount; 397 i < user_manager::kDefaultImagesCount;
402 ++i) { 398 ++i) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 void SupervisedUserCreationScreenHandler::SetCameraPresent(bool present) { 455 void SupervisedUserCreationScreenHandler::SetCameraPresent(bool present) {
460 CallJS("setCameraPresent", present); 456 CallJS("setCameraPresent", present);
461 } 457 }
462 458
463 void SupervisedUserCreationScreenHandler::ShowExistingSupervisedUsers( 459 void SupervisedUserCreationScreenHandler::ShowExistingSupervisedUsers(
464 const base::ListValue* users) { 460 const base::ListValue* users) {
465 CallJS("setExistingSupervisedUsers", *users); 461 CallJS("setExistingSupervisedUsers", *users);
466 } 462 }
467 463
468 } // namespace chromeos 464 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698