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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 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 17 matching lines...) Expand all
28 class PrefRegistrySimple; 28 class PrefRegistrySimple;
29 class PrefService; 29 class PrefService;
30 class Profile; 30 class Profile;
31 31
32 namespace net { 32 namespace net {
33 class URLRequestContextGetter; 33 class URLRequestContextGetter;
34 } 34 }
35 35
36 namespace user_manager { 36 namespace user_manager {
37 class User; 37 class User;
38 class UserID;
38 } // namespace user_manager 39 } // namespace user_manager
39 40
40 namespace chromeos { 41 namespace chromeos {
41 42
42 namespace test { 43 namespace test {
43 class UserSessionManagerTestApi; 44 class UserSessionManagerTestApi;
44 } // namespace test 45 } // namespace test
45 46
46 class EasyUnlockKeyManager; 47 class EasyUnlockKeyManager;
47 class InputEventsBlocker; 48 class InputEventsBlocker;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 241
241 const UserContext& user_context() const { return user_context_; } 242 const UserContext& user_context() const { return user_context_; }
242 bool has_auth_cookies() const { return has_auth_cookies_; } 243 bool has_auth_cookies() const { return has_auth_cookies_; }
243 244
244 void Shutdown(); 245 void Shutdown();
245 246
246 private: 247 private:
247 friend class test::UserSessionManagerTestApi; 248 friend class test::UserSessionManagerTestApi;
248 friend struct DefaultSingletonTraits<UserSessionManager>; 249 friend struct DefaultSingletonTraits<UserSessionManager>;
249 250
250 typedef std::set<std::string> SigninSessionRestoreStateSet; 251 typedef std::set<user_manager::UserID> SigninSessionRestoreStateSet;
251 252
252 UserSessionManager(); 253 UserSessionManager();
253 ~UserSessionManager() override; 254 ~UserSessionManager() override;
254 255
255 // OAuth2LoginManager::Observer overrides: 256 // OAuth2LoginManager::Observer overrides:
256 void OnSessionRestoreStateChanged( 257 void OnSessionRestoreStateChanged(
257 Profile* user_profile, 258 Profile* user_profile,
258 OAuth2LoginManager::SessionRestoreState state) override; 259 OAuth2LoginManager::SessionRestoreState state) override;
259 260
260 // net::NetworkChangeNotifier::ConnectionTypeObserver overrides: 261 // net::NetworkChangeNotifier::ConnectionTypeObserver overrides:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // Initializes basic preferences for newly created profile. Any other 293 // Initializes basic preferences for newly created profile. Any other
293 // early profile initialization that needs to happen before 294 // early profile initialization that needs to happen before
294 // ProfileManager::DoFinalInit() gets called is done here. 295 // ProfileManager::DoFinalInit() gets called is done here.
295 void InitProfilePreferences(Profile* profile, 296 void InitProfilePreferences(Profile* profile,
296 const UserContext& user_context); 297 const UserContext& user_context);
297 298
298 // Callback for Profile::CREATE_STATUS_INITIALIZED profile state. 299 // Callback for Profile::CREATE_STATUS_INITIALIZED profile state.
299 // Profile is created, extensions and promo resources are initialized. 300 // Profile is created, extensions and promo resources are initialized.
300 void UserProfileInitialized(Profile* profile, 301 void UserProfileInitialized(Profile* profile,
301 bool is_incognito_profile, 302 bool is_incognito_profile,
302 const std::string& user_id); 303 const user_manager::UserID& user_id);
303 304
304 // Callback to resume profile creation after transferring auth data from 305 // Callback to resume profile creation after transferring auth data from
305 // the authentication profile. 306 // the authentication profile.
306 void CompleteProfileCreateAfterAuthTransfer(Profile* profile); 307 void CompleteProfileCreateAfterAuthTransfer(Profile* profile);
307 308
308 // Finalized profile preparation. 309 // Finalized profile preparation.
309 void FinalizePrepareProfile(Profile* profile); 310 void FinalizePrepareProfile(Profile* profile);
310 311
311 // Starts out-of-box flow with the specified screen. 312 // Starts out-of-box flow with the specified screen.
312 void ActivateWizard(const std::string& screen_name); 313 void ActivateWizard(const std::string& screen_name);
(...skipping 30 matching lines...) Expand all
343 void RestorePendingUserSessions(); 344 void RestorePendingUserSessions();
344 345
345 // Notifies observers that user pending sessions restore has finished. 346 // Notifies observers that user pending sessions restore has finished.
346 void NotifyPendingUserSessionsRestoreFinished(); 347 void NotifyPendingUserSessionsRestoreFinished();
347 348
348 // Attempts restarting the browser process and esures that this does 349 // Attempts restarting the browser process and esures that this does
349 // not happen while we are still fetching new OAuth refresh tokens. 350 // not happen while we are still fetching new OAuth refresh tokens.
350 void AttemptRestart(Profile* profile); 351 void AttemptRestart(Profile* profile);
351 352
352 // Callback invoked when Easy unlock key operations are finished. 353 // Callback invoked when Easy unlock key operations are finished.
353 void OnEasyUnlockKeyOpsFinished(const std::string& user_id, 354 void OnEasyUnlockKeyOpsFinished(const user_manager::UserID& user_id,
354 bool success); 355 bool success);
355 356
356 // Internal implementation of DoBrowserLaunch. Initially should be called with 357 // Internal implementation of DoBrowserLaunch. Initially should be called with
357 // |locale_pref_checked| set to false which will result in postponing browser 358 // |locale_pref_checked| set to false which will result in postponing browser
358 // launch till user locale is applied if needed. After locale check has 359 // launch till user locale is applied if needed. After locale check has
359 // completed this method is called with |locale_pref_checked| set to true. 360 // completed this method is called with |locale_pref_checked| set to true.
360 void DoBrowserLaunchInternal(Profile* profile, 361 void DoBrowserLaunchInternal(Profile* profile,
361 LoginDisplayHost* login_host, 362 LoginDisplayHost* login_host,
362 bool locale_pref_checked); 363 bool locale_pref_checked);
363 364
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 bool waiting_for_child_account_status_; 467 bool waiting_for_child_account_status_;
467 468
468 base::WeakPtrFactory<UserSessionManager> weak_factory_; 469 base::WeakPtrFactory<UserSessionManager> weak_factory_;
469 470
470 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); 471 DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
471 }; 472 };
472 473
473 } // namespace chromeos 474 } // namespace chromeos
474 475
475 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 476 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698