| 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/login/ui/lock_screen.h" |
| 8 #include "ash/public/interfaces/user_info.mojom.h" | 9 #include "ash/public/interfaces/user_info.mojom.h" |
| 9 #include "ash/session/session_controller.h" | 10 #include "ash/session/session_controller.h" |
| 10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 12 #include "ui/gfx/geometry/insets.h" | 13 #include "ui/gfx/geometry/insets.h" |
| 13 #include "ui/views/background.h" | 14 #include "ui/views/background.h" |
| 14 #include "ui/views/border.h" | 15 #include "ui/views/border.h" |
| 15 #include "ui/views/layout/box_layout.h" | 16 #include "ui/views/layout/box_layout.h" |
| 16 | 17 |
| 17 namespace ash { | 18 namespace ash { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 38 const ui::Event& event) { | 39 const ui::Event& event) { |
| 39 DCHECK(unlock_button_ == sender); | 40 DCHECK(unlock_button_ == sender); |
| 40 | 41 |
| 41 // TODO: user index shouldn't be hard coded here. Complete the implementation | 42 // TODO: user index shouldn't be hard coded here. Complete the implementation |
| 42 // below. | 43 // below. |
| 43 const int user_index = 0; | 44 const int user_index = 0; |
| 44 const mojom::UserSession* const user_session = | 45 const mojom::UserSession* const user_session = |
| 45 Shell::Get()->session_controller()->GetUserSession(user_index); | 46 Shell::Get()->session_controller()->GetUserSession(user_index); |
| 46 Shell::Get()->lock_screen_controller()->AuthenticateUser( | 47 Shell::Get()->lock_screen_controller()->AuthenticateUser( |
| 47 user_session->user_info->account_id, std::string(), | 48 user_session->user_info->account_id, std::string(), |
| 48 false /* authenticated_by_pin */); | 49 false /* authenticated_by_pin */, base::BindOnce([](bool success) { |
| 50 if (success) |
| 51 DestroyLockScreen(); |
| 52 })); |
| 49 } | 53 } |
| 50 | 54 |
| 51 } // namespace ash | 55 } // namespace ash |
| OLD | NEW |