OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/app_launch_signin_screen.h" | 5 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 8 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
9 #include "chrome/browser/chromeos/login/login_utils.h" | 9 #include "chrome/browser/chromeos/login/login_utils.h" |
10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" | 10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
11 #include "chrome/browser/signin/screenlock_bridge.h" | 11 #include "chrome/browser/signin/signin_screen_bridge.h" |
12 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 12 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
14 #include "components/user_manager/user_manager.h" | 14 #include "components/user_manager/user_manager.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 user_manager::UserManager* AppLaunchSigninScreen::test_user_manager_ = NULL; | 21 user_manager::UserManager* AppLaunchSigninScreen::test_user_manager_ = NULL; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 delegate_->OnOwnerSigninSuccess(); | 189 delegate_->OnOwnerSigninSuccess(); |
190 } | 190 } |
191 | 191 |
192 void AppLaunchSigninScreen::HandleGetUsers() { | 192 void AppLaunchSigninScreen::HandleGetUsers() { |
193 base::ListValue users_list; | 193 base::ListValue users_list; |
194 const user_manager::UserList& users = GetUsers(); | 194 const user_manager::UserList& users = GetUsers(); |
195 | 195 |
196 for (user_manager::UserList::const_iterator it = users.begin(); | 196 for (user_manager::UserList::const_iterator it = users.begin(); |
197 it != users.end(); | 197 it != users.end(); |
198 ++it) { | 198 ++it) { |
199 ScreenlockBridge::LockHandler::AuthType initial_auth_type = | 199 SigninScreenBridge::LockHandler::AuthType initial_auth_type = |
200 UserSelectionScreen::ShouldForceOnlineSignIn(*it) | 200 UserSelectionScreen::ShouldForceOnlineSignIn(*it) |
201 ? ScreenlockBridge::LockHandler::ONLINE_SIGN_IN | 201 ? SigninScreenBridge::LockHandler::ONLINE_SIGN_IN |
202 : ScreenlockBridge::LockHandler::OFFLINE_PASSWORD; | 202 : SigninScreenBridge::LockHandler::OFFLINE_PASSWORD; |
203 base::DictionaryValue* user_dict = new base::DictionaryValue(); | 203 base::DictionaryValue* user_dict = new base::DictionaryValue(); |
204 UserSelectionScreen::FillUserDictionary( | 204 UserSelectionScreen::FillUserDictionary( |
205 *it, | 205 *it, |
206 true, /* is_owner */ | 206 true, /* is_owner */ |
207 false, /* is_signin_to_add */ | 207 false, /* is_signin_to_add */ |
208 initial_auth_type, | 208 initial_auth_type, |
209 NULL, /* public_session_recommended_locales */ | 209 NULL, /* public_session_recommended_locales */ |
210 user_dict); | 210 user_dict); |
211 users_list.Append(user_dict); | 211 users_list.Append(user_dict); |
212 } | 212 } |
213 | 213 |
214 webui_handler_->LoadUsers(users_list, false); | 214 webui_handler_->LoadUsers(users_list, false); |
215 } | 215 } |
216 | 216 |
217 void AppLaunchSigninScreen::SetAuthType( | 217 void AppLaunchSigninScreen::SetAuthType( |
218 const std::string& username, | 218 const std::string& username, |
219 ScreenlockBridge::LockHandler::AuthType auth_type) { | 219 SigninScreenBridge::LockHandler::AuthType auth_type) { |
220 return; | 220 return; |
221 } | 221 } |
222 | 222 |
223 ScreenlockBridge::LockHandler::AuthType AppLaunchSigninScreen::GetAuthType( | 223 SigninScreenBridge::LockHandler::AuthType AppLaunchSigninScreen::GetAuthType( |
224 const std::string& username) const { | 224 const std::string& username) const { |
225 return ScreenlockBridge::LockHandler::OFFLINE_PASSWORD; | 225 return SigninScreenBridge::LockHandler::OFFLINE_PASSWORD; |
226 } | 226 } |
227 | 227 |
228 } // namespace chromeos | 228 } // namespace chromeos |
OLD | NEW |