1 // Copyright 2013 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_FAKE_SUPERVISED_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_FAKE_SUPERVISED_USER_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/chromeos/login/supervised_user_manager.h"
14 // Fake supervised user manager with a barebones implementation.
15 class FakeSupervisedUserManager
: public SupervisedUserManager
{
17 FakeSupervisedUserManager();
18 virtual ~FakeSupervisedUserManager();
20 virtual bool HasSupervisedUsers(const std::string
& manager_id
) const OVERRIDE
;
21 virtual const 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 virtual std::string
GenerateUserId() OVERRIDE
;
27 virtual const User
* FindByDisplayName(const base::string16
& display_name
) const
29 virtual const User
* FindBySyncId(const std::string
& sync_id
) const OVERRIDE
;
30 virtual std::string
GetUserSyncId(const std::string
& user_id
) const OVERRIDE
;
31 virtual base::string16
GetManagerDisplayName(const std::string
& user_id
) const
33 virtual std::string
GetManagerUserId(const std::string
& user_id
) const
35 virtual std::string
GetManagerDisplayEmail(const std::string
& user_id
) const
37 virtual void StartCreationTransaction(const base::string16
& display_name
)
39 virtual void SetCreationTransactionUserId(const std::string
& user_id
)
41 virtual void CommitCreationTransaction() OVERRIDE
{}
42 virtual SupervisedUserAuthentication
* GetAuthentication() OVERRIDE
;
43 virtual void GetPasswordInformation(
44 const std::string
& user_id
,
45 base::DictionaryValue
* result
) OVERRIDE
{}
46 virtual void SetPasswordInformation(
47 const std::string
& user_id
,
48 const base::DictionaryValue
* password_info
) OVERRIDE
{}
49 virtual void LoadSupervisedUserToken(
51 const LoadTokenCallback
& callback
) OVERRIDE
;
52 virtual void ConfigureSyncWithToken(
54 const std::string
& token
) OVERRIDE
{}
57 DISALLOW_COPY_AND_ASSIGN(FakeSupervisedUserManager
);
60 } // namespace chromeos
62 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_FAKE_SUPERVISED_USER_MANAGER_H_