| OLD | NEW |
| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 const std::string& chrome_client_secret) = 0; | 342 const std::string& chrome_client_secret) = 0; |
| 343 | 343 |
| 344 virtual void AddObserver(Observer* obs) = 0; | 344 virtual void AddObserver(Observer* obs) = 0; |
| 345 virtual void RemoveObserver(Observer* obs) = 0; | 345 virtual void RemoveObserver(Observer* obs) = 0; |
| 346 | 346 |
| 347 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; | 347 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; |
| 348 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; | 348 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; |
| 349 | 349 |
| 350 virtual void NotifyLocalStateChanged() = 0; | 350 virtual void NotifyLocalStateChanged() = 0; |
| 351 | 351 |
| 352 // Returns true if locally managed users allowed. |
| 353 virtual bool AreLocallyManagedUsersAllowed() const = 0; |
| 354 |
| 352 private: | 355 private: |
| 353 friend class ScopedUserManagerEnabler; | 356 friend class ScopedUserManagerEnabler; |
| 354 | 357 |
| 355 // Sets the singleton to the given |user_manager|, taking ownership. Returns | 358 // Sets the singleton to the given |user_manager|, taking ownership. Returns |
| 356 // the previous value of the singleton, passing ownership. | 359 // the previous value of the singleton, passing ownership. |
| 357 static UserManager* SetForTesting(UserManager* user_manager); | 360 static UserManager* SetForTesting(UserManager* user_manager); |
| 358 }; | 361 }; |
| 359 | 362 |
| 360 // Helper class for unit tests. Initializes the UserManager singleton to the | 363 // Helper class for unit tests. Initializes the UserManager singleton to the |
| 361 // given |user_manager| and tears it down again on destruction. If the singleton | 364 // given |user_manager| and tears it down again on destruction. If the singleton |
| (...skipping 18 matching lines...) Expand all Loading... |
| 380 ScopedTestUserManager(); | 383 ScopedTestUserManager(); |
| 381 ~ScopedTestUserManager(); | 384 ~ScopedTestUserManager(); |
| 382 | 385 |
| 383 private: | 386 private: |
| 384 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); | 387 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); |
| 385 }; | 388 }; |
| 386 | 389 |
| 387 } // namespace chromeos | 390 } // namespace chromeos |
| 388 | 391 |
| 389 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 392 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |