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