| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "ash/login/ui/lock_contents_view.h" | 5 #include "ash/login/ui/lock_contents_view.h" |
| 6 | 6 |
| 7 #include "ash/login/lock_screen_controller.h" | 7 #include "ash/login/lock_screen_controller.h" |
| 8 #include "ash/public/interfaces/user_info.mojom.h" |
| 8 #include "ash/session/session_controller.h" | 9 #include "ash/session/session_controller.h" |
| 9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 11 #include "ui/views/background.h" | 12 #include "ui/views/background.h" |
| 12 #include "ui/views/border.h" | 13 #include "ui/views/border.h" |
| 13 #include "ui/views/layout/box_layout.h" | 14 #include "ui/views/layout/box_layout.h" |
| 14 | 15 |
| 15 namespace ash { | 16 namespace ash { |
| 16 | 17 |
| 17 LockContentsView::LockContentsView() { | 18 LockContentsView::LockContentsView() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 void LockContentsView::ButtonPressed(views::Button* sender, | 36 void LockContentsView::ButtonPressed(views::Button* sender, |
| 36 const ui::Event& event) { | 37 const ui::Event& event) { |
| 37 DCHECK(unlock_button_ == sender); | 38 DCHECK(unlock_button_ == sender); |
| 38 | 39 |
| 39 // TODO: user index shouldn't be hard coded here. Complete the implementation | 40 // TODO: user index shouldn't be hard coded here. Complete the implementation |
| 40 // below. | 41 // below. |
| 41 const int user_index = 0; | 42 const int user_index = 0; |
| 42 const mojom::UserSession* const user_session = | 43 const mojom::UserSession* const user_session = |
| 43 Shell::Get()->session_controller()->GetUserSession(user_index); | 44 Shell::Get()->session_controller()->GetUserSession(user_index); |
| 44 Shell::Get()->lock_screen_controller()->AuthenticateUser( | 45 Shell::Get()->lock_screen_controller()->AuthenticateUser( |
| 45 user_session->account_id, std::string(), | 46 user_session->user_info->account_id, std::string(), |
| 46 false /* authenticated_by_pin */); | 47 false /* authenticated_by_pin */); |
| 47 } | 48 } |
| 48 | 49 |
| 49 } // namespace ash | 50 } // namespace ash |
| OLD | NEW |