Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: ash/login/ui/lock_contents_view.cc

Issue 2911493002: cros: Pull user info from session_controller_client.mojom into separate mojom. (Closed)
Patch Set: Fix ordering in typemaps Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698