| 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 14 matching lines...) Expand all Loading... |
| 58 virtual MultiProfileUserController* GetMultiProfileUserController() OVERRIDE; | 61 virtual MultiProfileUserController* GetMultiProfileUserController() OVERRIDE; |
| 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 RemoveUser(const std::string& email, | 69 virtual void RemoveUser(const std::string& email, |
| 67 RemoveUserDelegate* delegate) OVERRIDE {} | 70 RemoveUserDelegate* delegate) OVERRIDE {} |
| 68 virtual void RemoveUserFromList(const std::string& email) OVERRIDE {} | 71 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; |
| 69 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; | 72 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; |
| 70 virtual const User* FindUser(const std::string& email) const OVERRIDE; | 73 virtual const User* FindUser(const std::string& email) const OVERRIDE; |
| 71 virtual User* FindUserAndModify(const std::string& email) OVERRIDE; | 74 virtual User* FindUserAndModify(const std::string& email) OVERRIDE; |
| 72 virtual const User* GetLoggedInUser() const OVERRIDE; | 75 virtual const User* GetLoggedInUser() const OVERRIDE; |
| 73 virtual User* GetLoggedInUser() OVERRIDE; | 76 virtual User* GetLoggedInUser() OVERRIDE; |
| 74 virtual const User* GetPrimaryUser() const OVERRIDE; | 77 virtual const User* GetPrimaryUser() const OVERRIDE; |
| 75 virtual void SaveUserOAuthStatus( | 78 virtual void SaveUserOAuthStatus( |
| 76 const std::string& username, | 79 const std::string& username, |
| 77 User::OAuthTokenStatus oauth_token_status) OVERRIDE {} | 80 User::OAuthTokenStatus oauth_token_status) OVERRIDE {} |
| 78 virtual void SaveForceOnlineSignin(const std::string& user_id, | 81 virtual void SaveForceOnlineSignin(const std::string& user_id, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // active user. | 137 // active user. |
| 135 std::string active_user_id_; | 138 std::string active_user_id_; |
| 136 MultiProfileUserController* multi_profile_user_controller_; | 139 MultiProfileUserController* multi_profile_user_controller_; |
| 137 | 140 |
| 138 DISALLOW_COPY_AND_ASSIGN(FakeUserManager); | 141 DISALLOW_COPY_AND_ASSIGN(FakeUserManager); |
| 139 }; | 142 }; |
| 140 | 143 |
| 141 } // namespace chromeos | 144 } // namespace chromeos |
| 142 | 145 |
| 143 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ | 146 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_USER_MANAGER_H_ |
| OLD | NEW |