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/screens/user_selection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 handler_->LoadUsers(users_list, show_guest_); | 355 handler_->LoadUsers(users_list, show_guest_); |
356 } | 356 } |
357 | 357 |
358 void UserSelectionScreen::HandleGetUsers() { | 358 void UserSelectionScreen::HandleGetUsers() { |
359 SendUserList(); | 359 SendUserList(); |
360 } | 360 } |
361 | 361 |
362 void UserSelectionScreen::SetAuthType( | 362 void UserSelectionScreen::SetAuthType( |
363 const std::string& username, | 363 const std::string& username, |
364 ScreenlockBridge::LockHandler::AuthType auth_type) { | 364 ScreenlockBridge::LockHandler::AuthType auth_type) { |
| 365 DCHECK(GetAuthType(username) != |
| 366 ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD || |
| 367 auth_type == ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD); |
365 user_auth_type_map_[username] = auth_type; | 368 user_auth_type_map_[username] = auth_type; |
366 } | 369 } |
367 | 370 |
368 ScreenlockBridge::LockHandler::AuthType UserSelectionScreen::GetAuthType( | 371 ScreenlockBridge::LockHandler::AuthType UserSelectionScreen::GetAuthType( |
369 const std::string& username) const { | 372 const std::string& username) const { |
370 if (user_auth_type_map_.find(username) == user_auth_type_map_.end()) | 373 if (user_auth_type_map_.find(username) == user_auth_type_map_.end()) |
371 return ScreenlockBridge::LockHandler::OFFLINE_PASSWORD; | 374 return ScreenlockBridge::LockHandler::OFFLINE_PASSWORD; |
372 return user_auth_type_map_.find(username)->second; | 375 return user_auth_type_map_.find(username)->second; |
373 } | 376 } |
374 | 377 |
375 } // namespace chromeos | 378 } // namespace chromeos |
OLD | NEW |