Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: components/user_manager/fake_user_manager.h

Issue 2885933003: arc: Consolidate IsArcAllowedForUser logic (Closed)
Patch Set: fix #2 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/arc/arc_util_unittest.cc ('k') | components/user_manager/fake_user_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_USER_MANAGER_FAKE_USER_MANAGER_H_ 5 #ifndef COMPONENTS_USER_MANAGER_FAKE_USER_MANAGER_H_
6 #define COMPONENTS_USER_MANAGER_FAKE_USER_MANAGER_H_ 6 #define COMPONENTS_USER_MANAGER_FAKE_USER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 // Create and add a new user. Created user is not affiliated with the domain, 25 // Create and add a new user. Created user is not affiliated with the domain,
26 // that owns the device. 26 // that owns the device.
27 virtual const user_manager::User* AddUser(const AccountId& account_id); 27 virtual const user_manager::User* AddUser(const AccountId& account_id);
28 28
29 // The same as AddUser() but allows to specify user affiliation with the 29 // The same as AddUser() but allows to specify user affiliation with the
30 // domain, that owns the device. 30 // domain, that owns the device.
31 virtual const user_manager::User* AddUserWithAffiliation( 31 virtual const user_manager::User* AddUserWithAffiliation(
32 const AccountId& account_id, 32 const AccountId& account_id,
33 bool is_affiliated); 33 bool is_affiliated);
34 34
35 // Calculates the user name hash and calls UserLoggedIn to login a user.
36 void LoginUser(const AccountId& account_id);
xiyuan 2017/05/17 21:36:14 Stale code with no impl.
37
38 // UserManager overrides. 35 // UserManager overrides.
39 const user_manager::UserList& GetUsers() const override; 36 const user_manager::UserList& GetUsers() const override;
40 user_manager::UserList GetUsersAllowedForMultiProfile() const override; 37 user_manager::UserList GetUsersAllowedForMultiProfile() const override;
41 const user_manager::UserList& GetLoggedInUsers() const override;
xiyuan 2017/05/17 21:36:14 Removed because it is the same as base class impl.
42 38
43 // Set the user as logged in. 39 // Set the user as logged in.
44 void UserLoggedIn(const AccountId& account_id, 40 void UserLoggedIn(const AccountId& account_id,
45 const std::string& username_hash, 41 const std::string& username_hash,
46 bool browser_restart) override; 42 bool browser_restart) override;
47 43
48 const user_manager::User* GetActiveUser() const override; 44 const user_manager::User* GetActiveUser() const override;
49 user_manager::User* GetActiveUser() override; 45 user_manager::User* GetActiveUser() override;
50 void SwitchActiveUser(const AccountId& account_id) override; 46 void SwitchActiveUser(const AccountId& account_id) override;
51 void SaveUserDisplayName(const AccountId& account_id, 47 void SaveUserDisplayName(const AccountId& account_id,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool IsSupervisedAccountId(const AccountId& account_id) const override; 108 bool IsSupervisedAccountId(const AccountId& account_id) const override;
113 const gfx::ImageSkia& GetResourceImagekiaNamed(int id) const override; 109 const gfx::ImageSkia& GetResourceImagekiaNamed(int id) const override;
114 base::string16 GetResourceStringUTF16(int string_id) const override; 110 base::string16 GetResourceStringUTF16(int string_id) const override;
115 void ScheduleResolveLocale(const std::string& locale, 111 void ScheduleResolveLocale(const std::string& locale,
116 const base::Closure& on_resolved_callback, 112 const base::Closure& on_resolved_callback,
117 std::string* out_resolved_locale) const override; 113 std::string* out_resolved_locale) const override;
118 bool IsValidDefaultUserImageId(int image_index) const override; 114 bool IsValidDefaultUserImageId(int image_index) const override;
119 115
120 // UserManagerBase overrides: 116 // UserManagerBase overrides:
121 bool AreEphemeralUsersEnabled() const override; 117 bool AreEphemeralUsersEnabled() const override;
118 void SetEphemeralUsersEnabled(bool enabled) override;
122 const std::string& GetApplicationLocale() const override; 119 const std::string& GetApplicationLocale() const override;
123 PrefService* GetLocalState() const override; 120 PrefService* GetLocalState() const override;
124 void HandleUserOAuthTokenStatusChange( 121 void HandleUserOAuthTokenStatusChange(
125 const AccountId& account_id, 122 const AccountId& account_id,
126 user_manager::User::OAuthTokenStatus status) const override {} 123 user_manager::User::OAuthTokenStatus status) const override {}
127 bool IsEnterpriseManaged() const override; 124 bool IsEnterpriseManaged() const override;
128 void LoadDeviceLocalAccounts( 125 void LoadDeviceLocalAccounts(
129 std::set<AccountId>* device_local_accounts_set) override {} 126 std::set<AccountId>* device_local_accounts_set) override {}
130 void PerformPreUserListLoadingActions() override {} 127 void PerformPreUserListLoadingActions() override {}
131 void PerformPostUserListLoadingActions() override {} 128 void PerformPostUserListLoadingActions() override {}
(...skipping 24 matching lines...) Expand all
156 153
157 // stub. Always empty. 154 // stub. Always empty.
158 gfx::ImageSkia empty_image_; 155 gfx::ImageSkia empty_image_;
159 156
160 DISALLOW_COPY_AND_ASSIGN(FakeUserManager); 157 DISALLOW_COPY_AND_ASSIGN(FakeUserManager);
161 }; 158 };
162 159
163 } // namespace user_manager 160 } // namespace user_manager
164 161
165 #endif // COMPONENTS_USER_MANAGER_FAKE_USER_MANAGER_H_ 162 #endif // COMPONENTS_USER_MANAGER_FAKE_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « components/arc/arc_util_unittest.cc ('k') | components/user_manager/fake_user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698