| 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/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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 ChromeUserManager::Get()->GetUsersAllowedForSupervisedUsersCreation(); | 218 ChromeUserManager::Get()->GetUsersAllowedForSupervisedUsersCreation(); |
| 219 std::string owner; | 219 std::string owner; |
| 220 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); | 220 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); |
| 221 | 221 |
| 222 for (user_manager::UserList::const_iterator it = users.begin(); | 222 for (user_manager::UserList::const_iterator it = users.begin(); |
| 223 it != users.end(); | 223 it != users.end(); |
| 224 ++it) { | 224 ++it) { |
| 225 bool is_owner = ((*it)->email() == owner); | 225 bool is_owner = ((*it)->email() == owner); |
| 226 base::DictionaryValue* user_dict = new base::DictionaryValue(); | 226 base::DictionaryValue* user_dict = new base::DictionaryValue(); |
| 227 UserSelectionScreen::FillUserDictionary( | 227 UserSelectionScreen::FillUserDictionary( |
| 228 *it, | 228 *it, is_owner, false, /* is_signin_to_add */ |
| 229 is_owner, | 229 proximity_auth::ScreenlockBridge::LockHandler::OFFLINE_PASSWORD, |
| 230 false, /* is_signin_to_add */ | |
| 231 ScreenlockBridge::LockHandler::OFFLINE_PASSWORD, | |
| 232 NULL, /* public_session_recommended_locales */ | 230 NULL, /* public_session_recommended_locales */ |
| 233 user_dict); | 231 user_dict); |
| 234 users_list->Append(user_dict); | 232 users_list->Append(user_dict); |
| 235 } | 233 } |
| 236 data->Set("managers", users_list.release()); | 234 data->Set("managers", users_list.release()); |
| 237 ShowScreen(OobeUI::kScreenSupervisedUserCreationFlow, data.get()); | 235 ShowScreen(OobeUI::kScreenSupervisedUserCreationFlow, data.get()); |
| 238 | 236 |
| 239 if (!delegate_) | 237 if (!delegate_) |
| 240 return; | 238 return; |
| 241 } | 239 } |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 void SupervisedUserCreationScreenHandler::SetCameraPresent(bool present) { | 455 void SupervisedUserCreationScreenHandler::SetCameraPresent(bool present) { |
| 458 CallJS("setCameraPresent", present); | 456 CallJS("setCameraPresent", present); |
| 459 } | 457 } |
| 460 | 458 |
| 461 void SupervisedUserCreationScreenHandler::ShowExistingSupervisedUsers( | 459 void SupervisedUserCreationScreenHandler::ShowExistingSupervisedUsers( |
| 462 const base::ListValue* users) { | 460 const base::ListValue* users) { |
| 463 CallJS("setExistingSupervisedUsers", *users); | 461 CallJS("setExistingSupervisedUsers", *users); |
| 464 } | 462 } |
| 465 | 463 |
| 466 } // namespace chromeos | 464 } // namespace chromeos |
| OLD | NEW |