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

Side by Side Diff: chrome/browser/chromeos/login/user_manager.h

Issue 15929005: [CrOS multi-profiles] Restore user sessions after crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_USER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/chromeos/login/user.h" 10 #include "chrome/browser/chromeos/login/user.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual ~Observer(); 46 virtual ~Observer();
47 }; 47 };
48 48
49 // TODO(nkostylev): Merge with session state refactoring CL. 49 // TODO(nkostylev): Merge with session state refactoring CL.
50 class UserSessionStateObserver { 50 class UserSessionStateObserver {
51 public: 51 public:
52 // Called right before notifying on user change so that those who rely 52 // Called right before notifying on user change so that those who rely
53 // on user_id hash would be accessing up-to-date value. 53 // on user_id hash would be accessing up-to-date value.
54 virtual void ActiveUserHashChanged(const std::string& hash) = 0; 54 virtual void ActiveUserHashChanged(const std::string& hash) = 0;
55 55
56 // Called when UserManager finishes restoring user sessions after crash.
57 virtual void PendingUserSessionsRestoreFinished() = 0;
58
56 protected: 59 protected:
57 virtual ~UserSessionStateObserver(); 60 virtual ~UserSessionStateObserver();
58 }; 61 };
59 62
60 // Username for stub login when not running on ChromeOS. 63 // Username for stub login when not running on ChromeOS.
61 static const char kStubUser[]; 64 static const char kStubUser[];
62 65
63 // Magic e-mail addresses are bad. They exist here because some code already 66 // Magic e-mail addresses are bad. They exist here because some code already
64 // depends on them and it is hard to figure out what. Any user types added in 67 // depends on them and it is hard to figure out what. Any user types added in
65 // the future should be identified by a new |UserType|, not a new magic e-mail 68 // the future should be identified by a new |UserType|, not a new magic e-mail
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 virtual bool IsLoggedInAsKioskApp() const = 0; 254 virtual bool IsLoggedInAsKioskApp() const = 0;
252 255
253 // Returns true if we're logged in as the stub user used for testing on Linux. 256 // Returns true if we're logged in as the stub user used for testing on Linux.
254 virtual bool IsLoggedInAsStub() const = 0; 257 virtual bool IsLoggedInAsStub() const = 0;
255 258
256 // Returns true if we're logged in and browser has been started i.e. 259 // Returns true if we're logged in and browser has been started i.e.
257 // browser_creator.LaunchBrowser(...) was called after sign in 260 // browser_creator.LaunchBrowser(...) was called after sign in
258 // or restart after crash. 261 // or restart after crash.
259 virtual bool IsSessionStarted() const = 0; 262 virtual bool IsSessionStarted() const = 0;
260 263
264 // Returns true iff browser has been restarted after crash and UserManager
265 // finished restoring user sessions.
266 virtual bool UserSessionsRestored() const = 0;
267
261 // Returns merge session status. 268 // Returns merge session status.
262 virtual MergeSessionState GetMergeSessionState() const = 0; 269 virtual MergeSessionState GetMergeSessionState() const = 0;
263 270
264 // Changes merge session status. 271 // Changes merge session status.
265 virtual void SetMergeSessionState(MergeSessionState status) = 0; 272 virtual void SetMergeSessionState(MergeSessionState status) = 0;
266 273
267 // Returns true when the browser has crashed and restarted during the current 274 // Returns true when the browser has crashed and restarted during the current
268 // user's session. 275 // user's session.
269 virtual bool HasBrowserRestarted() const = 0; 276 virtual bool HasBrowserRestarted() const = 0;
270 277
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 ScopedTestUserManager(); 363 ScopedTestUserManager();
357 ~ScopedTestUserManager(); 364 ~ScopedTestUserManager();
358 365
359 private: 366 private:
360 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); 367 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager);
361 }; 368 };
362 369
363 } // namespace chromeos 370 } // namespace chromeos
364 371
365 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 372 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/test_login_utils.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698