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

Side by Side Diff: components/user_manager/user_manager_base.cc

Issue 2416253004: ash: Use session_manager::SessionState (Closed)
Patch Set: add comment about session state in SessionStaetDelegateChromeos Created 4 years, 2 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 | « components/session_manager/session_manager_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/user_manager/user_manager_base.h" 5 #include "components/user_manager/user_manager_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Make sure that this function gets run only once. 249 // Make sure that this function gets run only once.
250 last_session_active_account_id_.clear(); 250 last_session_active_account_id_.clear();
251 } 251 }
252 252
253 void UserManagerBase::SessionStarted() { 253 void UserManagerBase::SessionStarted() {
254 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 254 DCHECK(task_runner_->RunsTasksOnCurrentThread());
255 session_started_ = true; 255 session_started_ = true;
256 256
257 CallUpdateLoginState(); 257 CallUpdateLoginState();
258 session_manager::SessionManager::Get()->SetSessionState( 258 session_manager::SessionManager::Get()->SetSessionState(
259 session_manager::SESSION_STATE_ACTIVE); 259 session_manager::SessionState::ACTIVE);
260 260
261 GetLocalState()->CommitPendingWrite(); 261 GetLocalState()->CommitPendingWrite();
262 } 262 }
263 263
264 void UserManagerBase::RemoveUser(const AccountId& account_id, 264 void UserManagerBase::RemoveUser(const AccountId& account_id,
265 RemoveUserDelegate* delegate) { 265 RemoveUserDelegate* delegate) {
266 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 266 DCHECK(task_runner_->RunsTasksOnCurrentThread());
267 267
268 if (!CanUserBeRemoved(FindUser(account_id))) 268 if (!CanUserBeRemoved(FindUser(account_id)))
269 return; 269 return;
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 } 1076 }
1077 1077
1078 void UserManagerBase::DeleteUser(User* user) { 1078 void UserManagerBase::DeleteUser(User* user) {
1079 const bool is_active_user = (user == active_user_); 1079 const bool is_active_user = (user == active_user_);
1080 delete user; 1080 delete user;
1081 if (is_active_user) 1081 if (is_active_user)
1082 active_user_ = nullptr; 1082 active_user_ = nullptr;
1083 } 1083 }
1084 1084
1085 } // namespace user_manager 1085 } // namespace user_manager
OLDNEW
« no previous file with comments | « components/session_manager/session_manager_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698