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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.h

Issue 417623002: user_manager component: Add UserManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check for LocalState, update test - make sure that policies are initialized on UserManager creation Created 6 years, 4 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 | Annotate | Revision Log
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 CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // and notifies observers. 91 // and notifies observers.
92 void RestoreActiveSessions(); 92 void RestoreActiveSessions();
93 93
94 // Returns true iff browser has been restarted after crash and UserManager 94 // Returns true iff browser has been restarted after crash and UserManager
95 // finished restoring user sessions. 95 // finished restoring user sessions.
96 bool UserSessionsRestored() const; 96 bool UserSessionsRestored() const;
97 97
98 // Initialize RLZ. 98 // Initialize RLZ.
99 void InitRlz(Profile* profile); 99 void InitRlz(Profile* profile);
100 100
101 // Returns true when the browser has crashed and restarted during the current
102 // user's session.
103 bool HasBrowserRestarted() const;
104
105 // TODO(nkostylev): Drop these methods once LoginUtilsImpl::AttemptRestart() 101 // TODO(nkostylev): Drop these methods once LoginUtilsImpl::AttemptRestart()
106 // is migrated. 102 // is migrated.
107 OAuth2LoginManager::SessionRestoreStrategy GetSigninSessionRestoreStrategy(); 103 OAuth2LoginManager::SessionRestoreStrategy GetSigninSessionRestoreStrategy();
108 bool exit_after_session_restore() { return exit_after_session_restore_; } 104 bool exit_after_session_restore() { return exit_after_session_restore_; }
109 void set_exit_after_session_restore(bool value) { 105 void set_exit_after_session_restore(bool value) {
110 exit_after_session_restore_ = value; 106 exit_after_session_restore_ = value;
111 } 107 }
112 108
113 // Invoked when the user is logging in for the first time, or is logging in to 109 // Invoked when the user is logging in for the first time, or is logging in to
114 // an ephemeral session type, such as guest or a public session. 110 // an ephemeral session type, such as guest or a public session.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // OAuthLoginManager. 192 // OAuthLoginManager.
197 void InitSessionRestoreStrategy(); 193 void InitSessionRestoreStrategy();
198 194
199 // Restores GAIA auth cookies for the created user profile from OAuth2 token. 195 // Restores GAIA auth cookies for the created user profile from OAuth2 token.
200 void RestoreAuthSessionImpl(Profile* profile, 196 void RestoreAuthSessionImpl(Profile* profile,
201 bool restore_from_auth_cookies); 197 bool restore_from_auth_cookies);
202 198
203 // Initializes RLZ. If |disabled| is true, RLZ pings are disabled. 199 // Initializes RLZ. If |disabled| is true, RLZ pings are disabled.
204 void InitRlzImpl(Profile* profile, bool disabled); 200 void InitRlzImpl(Profile* profile, bool disabled);
205 201
206 // Get the NSS cert database for the primary user and start certificate 202 // Get the NSS cert database for the user represented with |profile|
207 // loader with it. 203 // and start certificate loader with it.
208 void InitializeCertsForPrimaryUser(Profile* profile); 204 void InitializeCerts(Profile* profile);
205
206 // Starts loading CRL set.
207 void InitializeCRLSetFetcher(const user_manager::User* user);
209 208
210 // Callback to process RetrieveActiveSessions() request results. 209 // Callback to process RetrieveActiveSessions() request results.
211 void OnRestoreActiveSessions( 210 void OnRestoreActiveSessions(
212 const SessionManagerClient::ActiveSessionsMap& sessions, 211 const SessionManagerClient::ActiveSessionsMap& sessions,
213 bool success); 212 bool success);
214 213
215 // Called by OnRestoreActiveSessions() when there're user sessions in 214 // Called by OnRestoreActiveSessions() when there're user sessions in
216 // |pending_user_sessions_| that has to be restored one by one. 215 // |pending_user_sessions_| that has to be restored one by one.
217 // Also called after first user session from that list is restored and so on. 216 // Also called after first user session from that list is restored and so on.
218 // Process continues till |pending_user_sessions_| map is not empty. 217 // Process continues till |pending_user_sessions_| map is not empty.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Chrome oauth client id and secret - override values for kiosk mode. 261 // Chrome oauth client id and secret - override values for kiosk mode.
263 std::string chrome_client_id_; 262 std::string chrome_client_id_;
264 std::string chrome_client_secret_; 263 std::string chrome_client_secret_;
265 264
266 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); 265 DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
267 }; 266 };
268 267
269 } // namespace chromeos 268 } // namespace chromeos
270 269
271 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 270 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698