| 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_FAKE_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 FakeUserManager(); | 25 FakeUserManager(); |
| 26 virtual ~FakeUserManager(); | 26 virtual ~FakeUserManager(); |
| 27 | 27 |
| 28 // Create and add a new user. | 28 // Create and add a new user. |
| 29 const User* AddUser(const std::string& email); | 29 const User* AddUser(const std::string& email); |
| 30 | 30 |
| 31 // Create and add a kiosk app user. | 31 // Create and add a kiosk app user. |
| 32 void AddKioskAppUser(const std::string& kiosk_app_username); | 32 void AddKioskAppUser(const std::string& kiosk_app_username); |
| 33 | 33 |
| 34 // Create and add a public account user. |
| 35 const User* AddPublicAccountUser(const std::string& email); |
| 36 |
| 34 // Calculates the user name hash and calls UserLoggedIn to login a user. | 37 // Calculates the user name hash and calls UserLoggedIn to login a user. |
| 35 void LoginUser(const std::string& email); | 38 void LoginUser(const std::string& email); |
| 36 | 39 |
| 37 // UserManager overrides. | 40 // UserManager overrides. |
| 38 virtual const UserList& GetUsers() const OVERRIDE; | 41 virtual const UserList& GetUsers() const OVERRIDE; |
| 39 virtual UserList GetUsersAdmittedForMultiProfile() const OVERRIDE; | 42 virtual UserList GetUsersAdmittedForMultiProfile() const OVERRIDE; |
| 40 virtual const UserList& GetLoggedInUsers() const OVERRIDE; | 43 virtual const UserList& GetLoggedInUsers() const OVERRIDE; |
| 41 | 44 |
| 42 // Set the user as logged in. | 45 // Set the user as logged in. |
| 43 virtual void UserLoggedIn(const std::string& email, | 46 virtual void UserLoggedIn(const std::string& email, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 59 virtual UserImageManager* GetUserImageManager( | 62 virtual UserImageManager* GetUserImageManager( |
| 60 const std::string& user_id) OVERRIDE; | 63 const std::string& user_id) OVERRIDE; |
| 61 virtual SupervisedUserManager* GetSupervisedUserManager() OVERRIDE; | 64 virtual SupervisedUserManager* GetSupervisedUserManager() OVERRIDE; |
| 62 virtual const UserList& GetLRULoggedInUsers() OVERRIDE; | 65 virtual const UserList& GetLRULoggedInUsers() OVERRIDE; |
| 63 virtual UserList GetUnlockUsers() const OVERRIDE; | 66 virtual UserList GetUnlockUsers() const OVERRIDE; |
| 64 virtual const std::string& GetOwnerEmail() OVERRIDE; | 67 virtual const std::string& GetOwnerEmail() OVERRIDE; |
| 65 virtual void SessionStarted() OVERRIDE {} | 68 virtual void SessionStarted() OVERRIDE {} |
| 66 virtual void RestoreActiveSessions() OVERRIDE {} | 69 virtual void RestoreActiveSessions() OVERRIDE {} |
| 67 virtual void RemoveUser(const std::string& email, | 70 virtual void RemoveUser(const std::string& email, |
| 68 RemoveUserDelegate* delegate) OVERRIDE {} | 71 RemoveUserDelegate* delegate) OVERRIDE {} |
| 69 virtual void RemoveUserFromList(const std::string& email) OVERRIDE {} | 72 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; |
| 70 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; | 73 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; |
| 71 virtual const User* FindUser(const std::string& email) const OVERRIDE; | 74 virtual const User* FindUser(const std::string& email) const OVERRIDE; |
| 72 virtual User* FindUserAndModify(const std::string& email) OVERRIDE; | 75 virtual User* FindUserAndModify(const std::string& email) OVERRIDE; |
| 73 virtual const User* GetLoggedInUser() const OVERRIDE; | 76 virtual const User* GetLoggedInUser() const OVERRIDE; |
| 74 virtual User* GetLoggedInUser() OVERRIDE; | 77 virtual User* GetLoggedInUser() OVERRIDE; |
| 75 virtual const User* GetPrimaryUser() const OVERRIDE; | 78 virtual const User* GetPrimaryUser() const OVERRIDE; |
| 76 virtual void SaveUserOAuthStatus( | 79 virtual void SaveUserOAuthStatus( |
| 77 const std::string& username, | 80 const std::string& username, |
| 78 User::OAuthTokenStatus oauth_token_status) OVERRIDE {} | 81 User::OAuthTokenStatus oauth_token_status) OVERRIDE {} |
| 79 virtual void SaveForceOnlineSignin(const std::string& user_id, | 82 virtual void SaveForceOnlineSignin(const std::string& user_id, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // active user. | 139 // active user. |
| 137 std::string active_user_id_; | 140 std::string active_user_id_; |
| 138 MultiProfileUserController* multi_profile_user_controller_; | 141 MultiProfileUserController* multi_profile_user_controller_; |
| 139 | 142 |
| 140 DISALLOW_COPY_AND_ASSIGN(FakeUserManager); | 143 DISALLOW_COPY_AND_ASSIGN(FakeUserManager); |
| 141 }; | 144 }; |
| 142 | 145 |
| 143 } // namespace chromeos | 146 } // namespace chromeos |
| 144 | 147 |
| 145 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ | 148 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ |
| OLD | NEW |