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

Side by Side Diff: components/user_manager/user_manager.h

Issue 594163002: Restore last used user session after crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: special case in ChromeUserManagerImpl Created 6 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
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 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_H_ 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_H_
6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/user_manager/user.h" 10 #include "components/user_manager/user.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // |browser_restart| is true when reloading Chrome after crash to distinguish 138 // |browser_restart| is true when reloading Chrome after crash to distinguish
139 // from normal sign in flow. 139 // from normal sign in flow.
140 // |username_hash| is used to identify homedir mount point. 140 // |username_hash| is used to identify homedir mount point.
141 virtual void UserLoggedIn(const std::string& user_id, 141 virtual void UserLoggedIn(const std::string& user_id,
142 const std::string& username_hash, 142 const std::string& username_hash,
143 bool browser_restart) = 0; 143 bool browser_restart) = 0;
144 144
145 // Switches to active user identified by |user_id|. User has to be logged in. 145 // Switches to active user identified by |user_id|. User has to be logged in.
146 virtual void SwitchActiveUser(const std::string& user_id) = 0; 146 virtual void SwitchActiveUser(const std::string& user_id) = 0;
147 147
148 // Switches to the last active user (called after crash happens and session
149 // restore has completed).
150 virtual void SwitchToLastActiveUser() = 0;
151
148 // Called when browser session is started i.e. after 152 // Called when browser session is started i.e. after
149 // browser_creator.LaunchBrowser(...) was called after user sign in. 153 // browser_creator.LaunchBrowser(...) was called after user sign in.
150 // When user is at the image screen IsUserLoggedIn() will return true 154 // When user is at the image screen IsUserLoggedIn() will return true
151 // but IsSessionStarted() will return false. During the kiosk splash screen, 155 // but IsSessionStarted() will return false. During the kiosk splash screen,
152 // we perform additional initialization after the user is logged in but 156 // we perform additional initialization after the user is logged in but
153 // before the session has been started. 157 // before the session has been started.
154 // Fires NOTIFICATION_SESSION_STARTED. 158 // Fires NOTIFICATION_SESSION_STARTED.
155 virtual void SessionStarted() = 0; 159 virtual void SessionStarted() = 0;
156 160
157 // Removes the user from the device. Note, it will verify that the given user 161 // Removes the user from the device. Note, it will verify that the given user
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 static UserManager* GetForTesting(); 314 static UserManager* GetForTesting();
311 315
312 // Sets UserManager instance to the given |user_manager|. 316 // Sets UserManager instance to the given |user_manager|.
313 // Returns the previous value of the instance. 317 // Returns the previous value of the instance.
314 static UserManager* SetForTesting(UserManager* user_manager); 318 static UserManager* SetForTesting(UserManager* user_manager);
315 }; 319 };
316 320
317 } // namespace user_manager 321 } // namespace user_manager
318 322
319 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ 323 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager_unittest.cc ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698