Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / login / users / fake_supervised_user_manager.h
blobd2a9a4389b2f85cf024bcbd29d13051fd1929fd9
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"
12 namespace chromeos {
14 // Fake supervised user manager with a barebones implementation.
15 class FakeSupervisedUserManager : public SupervisedUserManager {
16 public:
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 {}
50 private:
51 DISALLOW_COPY_AND_ASSIGN(FakeSupervisedUserManager);
54 } // namespace chromeos
56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_SUPERVISED_USER_MANAGER_H_