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_MOCK_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MOCK_USER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MOCK_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MOCK_USER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 void(UserManager::UserSessionStateObserver*)); | 71 void(UserManager::UserSessionStateObserver*)); |
72 MOCK_METHOD1(RemoveSessionStateObserver, | 72 MOCK_METHOD1(RemoveSessionStateObserver, |
73 void(UserManager::UserSessionStateObserver*)); | 73 void(UserManager::UserSessionStateObserver*)); |
74 MOCK_METHOD0(NotifyLocalStateChanged, void(void)); | 74 MOCK_METHOD0(NotifyLocalStateChanged, void(void)); |
75 MOCK_METHOD2(SetUserFlow, void(const std::string&, UserFlow*)); | 75 MOCK_METHOD2(SetUserFlow, void(const std::string&, UserFlow*)); |
76 MOCK_METHOD1(ResetUserFlow, void(const std::string&)); | 76 MOCK_METHOD1(ResetUserFlow, void(const std::string&)); |
77 | 77 |
78 MOCK_CONST_METHOD0(AreSupervisedUsersAllowed, bool(void)); | 78 MOCK_CONST_METHOD0(AreSupervisedUsersAllowed, bool(void)); |
79 | 79 |
80 // You can't mock these functions easily because nobody can create | 80 // You can't mock these functions easily because nobody can create |
81 // User objects but the UserManagerImpl and us. | 81 // User objects but the ChromeUserManager and us. |
82 virtual const user_manager::UserList& GetUsers() const OVERRIDE; | 82 virtual const user_manager::UserList& GetUsers() const OVERRIDE; |
83 virtual const user_manager::User* GetLoggedInUser() const OVERRIDE; | 83 virtual const user_manager::User* GetLoggedInUser() const OVERRIDE; |
84 virtual user_manager::UserList GetUnlockUsers() const OVERRIDE; | 84 virtual user_manager::UserList GetUnlockUsers() const OVERRIDE; |
85 virtual const std::string& GetOwnerEmail() OVERRIDE; | 85 virtual const std::string& GetOwnerEmail() const OVERRIDE; |
86 virtual user_manager::User* GetLoggedInUser() OVERRIDE; | 86 virtual user_manager::User* GetLoggedInUser() OVERRIDE; |
Dmitry Polukhin
2014/07/28 09:32:39
Why it is no const?
Nikita (slow)
2014/07/29 09:27:28
Replied in another comment.
| |
87 virtual const user_manager::User* GetActiveUser() const OVERRIDE; | 87 virtual const user_manager::User* GetActiveUser() const OVERRIDE; |
88 virtual user_manager::User* GetActiveUser() OVERRIDE; | 88 virtual user_manager::User* GetActiveUser() OVERRIDE; |
Dmitry Polukhin
2014/07/28 09:32:39
Ditto.
Nikita (slow)
2014/07/29 09:27:27
Replied in another comment.
| |
89 virtual const user_manager::User* GetPrimaryUser() const OVERRIDE; | 89 virtual const user_manager::User* GetPrimaryUser() const OVERRIDE; |
90 | 90 |
91 virtual MultiProfileUserController* GetMultiProfileUserController() OVERRIDE; | 91 virtual MultiProfileUserController* GetMultiProfileUserController() OVERRIDE; |
92 virtual UserImageManager* GetUserImageManager( | 92 virtual UserImageManager* GetUserImageManager( |
93 const std::string& user_id) OVERRIDE; | 93 const std::string& user_id) OVERRIDE; |
94 virtual SupervisedUserManager* GetSupervisedUserManager() OVERRIDE; | 94 virtual SupervisedUserManager* GetSupervisedUserManager() OVERRIDE; |
95 | 95 |
96 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE; | 96 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE; |
97 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE; | 97 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE; |
98 | 98 |
(...skipping 15 matching lines...) Expand all Loading... | |
114 | 114 |
115 scoped_ptr<UserFlow> user_flow_; | 115 scoped_ptr<UserFlow> user_flow_; |
116 scoped_ptr<MockUserImageManager> user_image_manager_; | 116 scoped_ptr<MockUserImageManager> user_image_manager_; |
117 scoped_ptr<FakeSupervisedUserManager> supervised_user_manager_; | 117 scoped_ptr<FakeSupervisedUserManager> supervised_user_manager_; |
118 user_manager::UserList user_list_; | 118 user_manager::UserList user_list_; |
119 }; | 119 }; |
120 | 120 |
121 } // namespace chromeos | 121 } // namespace chromeos |
122 | 122 |
123 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MOCK_USER_MANAGER_H_ | 123 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MOCK_USER_MANAGER_H_ |
OLD | NEW |