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_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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 | 524 |
525 void SupervisedUserCreationScreen::OnCameraPresenceCheckDone( | 525 void SupervisedUserCreationScreen::OnCameraPresenceCheckDone( |
526 bool is_camera_present) { | 526 bool is_camera_present) { |
527 if (actor_) | 527 if (actor_) |
528 actor_->SetCameraPresent(is_camera_present); | 528 actor_->SetCameraPresent(is_camera_present); |
529 } | 529 } |
530 | 530 |
531 void SupervisedUserCreationScreen::OnGetSupervisedUsers( | 531 void SupervisedUserCreationScreen::OnGetSupervisedUsers( |
532 const base::DictionaryValue* users) { | 532 const base::DictionaryValue* users) { |
533 // Copy for passing to WebUI, contains only id, name and avatar URL. | 533 // Copy for passing to WebUI, contains only id, name and avatar URL. |
534 scoped_ptr<base::ListValue> ui_users(new base::ListValue()); | 534 std::unique_ptr<base::ListValue> ui_users(new base::ListValue()); |
535 SupervisedUserManager* supervised_user_manager = | 535 SupervisedUserManager* supervised_user_manager = |
536 ChromeUserManager::Get()->GetSupervisedUserManager(); | 536 ChromeUserManager::Get()->GetSupervisedUserManager(); |
537 | 537 |
538 // Stored copy, contains all necessary information. | 538 // Stored copy, contains all necessary information. |
539 existing_users_.reset(new base::DictionaryValue()); | 539 existing_users_.reset(new base::DictionaryValue()); |
540 for (base::DictionaryValue::Iterator it(*users); !it.IsAtEnd(); | 540 for (base::DictionaryValue::Iterator it(*users); !it.IsAtEnd(); |
541 it.Advance()) { | 541 it.Advance()) { |
542 // Copy that would be stored in this class. | 542 // Copy that would be stored in this class. |
543 base::DictionaryValue* local_copy = | 543 base::DictionaryValue* local_copy = |
544 static_cast<base::DictionaryValue*>(it.value().DeepCopy()); | 544 static_cast<base::DictionaryValue*>(it.value().DeepCopy()); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; | 633 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; |
634 } else { | 634 } else { |
635 NOTREACHED() << "Unexpected image type: " << image_type; | 635 NOTREACHED() << "Unexpected image type: " << image_type; |
636 } | 636 } |
637 } | 637 } |
638 | 638 |
639 void SupervisedUserCreationScreen::OnImageAccepted() { | 639 void SupervisedUserCreationScreen::OnImageAccepted() { |
640 } | 640 } |
641 | 641 |
642 } // namespace chromeos | 642 } // namespace chromeos |
OLD | NEW |