| OLD | NEW |
| 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_USERS_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/login/user_flow.h" | 10 #include "chrome/browser/chromeos/login/user_flow.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 // Returns true if we're logged in as a demo user. | 256 // Returns true if we're logged in as a demo user. |
| 257 virtual bool IsLoggedInAsDemoUser() const = 0; | 257 virtual bool IsLoggedInAsDemoUser() const = 0; |
| 258 | 258 |
| 259 // Returns true if we're logged in as a public account. | 259 // Returns true if we're logged in as a public account. |
| 260 virtual bool IsLoggedInAsPublicAccount() const = 0; | 260 virtual bool IsLoggedInAsPublicAccount() const = 0; |
| 261 | 261 |
| 262 // Returns true if we're logged in as a Guest. | 262 // Returns true if we're logged in as a Guest. |
| 263 virtual bool IsLoggedInAsGuest() const = 0; | 263 virtual bool IsLoggedInAsGuest() const = 0; |
| 264 | 264 |
| 265 // Returns true if we're logged in as a locally managed user. | 265 // Returns true if we're logged in as a supervised user. |
| 266 virtual bool IsLoggedInAsLocallyManagedUser() const = 0; | 266 virtual bool IsLoggedInAsSupervisedUser() const = 0; |
| 267 | 267 |
| 268 // Returns true if we're logged in as a kiosk app. | 268 // Returns true if we're logged in as a kiosk app. |
| 269 virtual bool IsLoggedInAsKioskApp() const = 0; | 269 virtual bool IsLoggedInAsKioskApp() const = 0; |
| 270 | 270 |
| 271 // Returns true if we're logged in as the stub user used for testing on Linux. | 271 // Returns true if we're logged in as the stub user used for testing on Linux. |
| 272 virtual bool IsLoggedInAsStub() const = 0; | 272 virtual bool IsLoggedInAsStub() const = 0; |
| 273 | 273 |
| 274 // Returns true if we're logged in and browser has been started i.e. | 274 // Returns true if we're logged in and browser has been started i.e. |
| 275 // browser_creator.LaunchBrowser(...) was called after sign in | 275 // browser_creator.LaunchBrowser(...) was called after sign in |
| 276 // or restart after crash. | 276 // or restart after crash. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 302 virtual void ResetUserFlow(const std::string& user_id) = 0; | 302 virtual void ResetUserFlow(const std::string& user_id) = 0; |
| 303 | 303 |
| 304 virtual void AddObserver(Observer* obs) = 0; | 304 virtual void AddObserver(Observer* obs) = 0; |
| 305 virtual void RemoveObserver(Observer* obs) = 0; | 305 virtual void RemoveObserver(Observer* obs) = 0; |
| 306 | 306 |
| 307 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; | 307 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; |
| 308 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; | 308 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; |
| 309 | 309 |
| 310 virtual void NotifyLocalStateChanged() = 0; | 310 virtual void NotifyLocalStateChanged() = 0; |
| 311 | 311 |
| 312 // Returns true if locally managed users allowed. | 312 // Returns true if supervised users allowed. |
| 313 virtual bool AreLocallyManagedUsersAllowed() const = 0; | 313 virtual bool AreSupervisedUsersAllowed() const = 0; |
| 314 | 314 |
| 315 private: | 315 private: |
| 316 friend class ScopedUserManagerEnabler; | 316 friend class ScopedUserManagerEnabler; |
| 317 | 317 |
| 318 // Sets the singleton to the given |user_manager|, taking ownership. Returns | 318 // Sets the singleton to the given |user_manager|, taking ownership. Returns |
| 319 // the previous value of the singleton, passing ownership. | 319 // the previous value of the singleton, passing ownership. |
| 320 static UserManager* SetForTesting(UserManager* user_manager); | 320 static UserManager* SetForTesting(UserManager* user_manager); |
| 321 }; | 321 }; |
| 322 | 322 |
| 323 // Helper class for unit tests. Initializes the UserManager singleton to the | 323 // Helper class for unit tests. Initializes the UserManager singleton to the |
| (...skipping 19 matching lines...) Expand all Loading... |
| 343 ScopedTestUserManager(); | 343 ScopedTestUserManager(); |
| 344 ~ScopedTestUserManager(); | 344 ~ScopedTestUserManager(); |
| 345 | 345 |
| 346 private: | 346 private: |
| 347 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); | 347 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); |
| 348 }; | 348 }; |
| 349 | 349 |
| 350 } // namespace chromeos | 350 } // namespace chromeos |
| 351 | 351 |
| 352 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_H_ | 352 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_H_ |
| OLD | NEW |