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

Side by Side Diff: chrome/browser/ui/ash/session_controller_client.cc

Issue 2797743002: ash: Merge LoginStatus update code path (Closed)
Patch Set: for #2 comments Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/ash/session_controller_client.h" 5 #include "chrome/browser/ui/ash/session_controller_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/public/cpp/session_types.h" 10 #include "ash/public/cpp/session_types.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 SendUserSessionOrder(); 127 SendUserSessionOrder();
128 } 128 }
129 129
130 void SessionControllerClient::UserAddedToSession(const User* added_user) { 130 void SessionControllerClient::UserAddedToSession(const User* added_user) {
131 SendSessionInfoIfChanged(); 131 SendSessionInfoIfChanged();
132 SendUserSession(*added_user); 132 SendUserSession(*added_user);
133 } 133 }
134 134
135 void SessionControllerClient::UserChangedChildStatus(User* user) {
136 SendUserSession(*user);
137 }
138
135 void SessionControllerClient::OnUserImageChanged( 139 void SessionControllerClient::OnUserImageChanged(
136 const user_manager::User& user) { 140 const user_manager::User& user) {
137 SendUserSession(user); 141 SendUserSession(user);
138 } 142 }
139 143
140 // static 144 // static
141 bool SessionControllerClient::CanLockScreen() { 145 bool SessionControllerClient::CanLockScreen() {
142 return !UserManager::Get()->GetUnlockUsers().empty(); 146 return !UserManager::Get()->GetUnlockUsers().empty();
143 } 147 }
144 148
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 const UserList logged_in_users = user_manager->GetLoggedInUsers(); 289 const UserList logged_in_users = user_manager->GetLoggedInUsers();
286 std::vector<uint32_t> user_session_ids; 290 std::vector<uint32_t> user_session_ids;
287 for (auto* user : user_manager->GetLRULoggedInUsers()) { 291 for (auto* user : user_manager->GetLRULoggedInUsers()) {
288 const uint32_t user_session_id = GetSessionId(*user); 292 const uint32_t user_session_id = GetSessionId(*user);
289 DCHECK_NE(0u, user_session_id); 293 DCHECK_NE(0u, user_session_id);
290 user_session_ids.push_back(user_session_id); 294 user_session_ids.push_back(user_session_id);
291 } 295 }
292 296
293 session_controller_->SetUserSessionOrder(user_session_ids); 297 session_controller_->SetUserSessionOrder(user_session_ids);
294 } 298 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/session_controller_client.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698