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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_SUPERVISED_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_SUPERVISED_USER_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
14 // Fake supervised user manager with a barebones implementation.
15 class FakeSupervisedUserManager
: public SupervisedUserManager
{
17 FakeSupervisedUserManager();
18 ~FakeSupervisedUserManager() override
;
20 bool HasSupervisedUsers(const std::string
& manager_id
) const override
;
21 const user_manager::User
* CreateUserRecord(
22 const std::string
& manager_id
,
23 const std::string
& local_user_id
,
24 const std::string
& sync_user_id
,
25 const base::string16
& display_name
) override
;
26 std::string
GenerateUserId() override
;
27 const user_manager::User
* FindByDisplayName(
28 const base::string16
& display_name
) const override
;
29 const user_manager::User
* FindBySyncId(
30 const std::string
& sync_id
) const override
;
31 std::string
GetUserSyncId(const std::string
& user_id
) const override
;
32 base::string16
GetManagerDisplayName(
33 const std::string
& user_id
) const override
;
34 std::string
GetManagerUserId(const std::string
& user_id
) const override
;
35 std::string
GetManagerDisplayEmail(const std::string
& user_id
) const override
;
36 void StartCreationTransaction(const base::string16
& display_name
) override
{}
37 void SetCreationTransactionUserId(const std::string
& user_id
) override
{}
38 void CommitCreationTransaction() override
{}
39 SupervisedUserAuthentication
* GetAuthentication() override
;
40 void GetPasswordInformation(const std::string
& user_id
,
41 base::DictionaryValue
* result
) override
{}
42 void SetPasswordInformation(
43 const std::string
& user_id
,
44 const base::DictionaryValue
* password_info
) override
{}
45 void LoadSupervisedUserToken(Profile
* profile
,
46 const LoadTokenCallback
& callback
) override
;
47 void ConfigureSyncWithToken(Profile
* profile
,
48 const std::string
& token
) override
{}
51 DISALLOW_COPY_AND_ASSIGN(FakeSupervisedUserManager
);
54 } // namespace chromeos
56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_SUPERVISED_USER_MANAGER_H_