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 const User
* CreateUserRecord(
21 const std::string
& manager_id
,
22 const std::string
& local_user_id
,
23 const std::string
& sync_user_id
,
24 const base::string16
& display_name
) OVERRIDE
;
25 virtual std::string
GenerateUserId() OVERRIDE
;
26 virtual const User
* FindByDisplayName(const base::string16
& display_name
) const
28 virtual const User
* FindBySyncId(const std::string
& sync_id
) const OVERRIDE
;
29 virtual std::string
GetUserSyncId(const std::string
& user_id
) const OVERRIDE
;
30 virtual base::string16
GetManagerDisplayName(const std::string
& user_id
) const
32 virtual std::string
GetManagerUserId(const std::string
& user_id
) const
34 virtual std::string
GetManagerDisplayEmail(const std::string
& user_id
) const
36 virtual void StartCreationTransaction(const base::string16
& display_name
)
38 virtual void SetCreationTransactionUserId(const std::string
& user_id
)
40 virtual void CommitCreationTransaction() OVERRIDE
{}
41 virtual SupervisedUserAuthentication
* GetAuthentication() OVERRIDE
;
42 virtual void GetPasswordInformation(
43 const std::string
& user_id
,
44 base::DictionaryValue
* result
) OVERRIDE
{}
45 virtual void SetPasswordInformation(
46 const std::string
& user_id
,
47 const base::DictionaryValue
* password_info
) OVERRIDE
{}
50 DISALLOW_COPY_AND_ASSIGN(FakeSupervisedUserManager
);
53 } // namespace chromeos
55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_FAKE_SUPERVISED_USER_MANAGER_H_