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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.h

Issue 1266563002: Added affiliation IDs for the new affiliation determination. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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 CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // policy::DeviceLocalAccountPolicyService::Observer implementation. 109 // policy::DeviceLocalAccountPolicyService::Observer implementation.
110 void OnPolicyUpdated(const std::string& user_id) override; 110 void OnPolicyUpdated(const std::string& user_id) override;
111 void OnDeviceLocalAccountsChanged() override; 111 void OnDeviceLocalAccountsChanged() override;
112 112
113 void StopPolicyObserverForTesting(); 113 void StopPolicyObserverForTesting();
114 114
115 // UserManagerBase implementation: 115 // UserManagerBase implementation:
116 bool AreEphemeralUsersEnabled() const override; 116 bool AreEphemeralUsersEnabled() const override;
117 117
118 // ChromeUserManager implementation:
119 void SetUserAffiliation(
120 const std::string& user_id,
121 const std::set<std::string>& user_affiliation_ids) override;
122
118 protected: 123 protected:
119 const std::string& GetApplicationLocale() const override; 124 const std::string& GetApplicationLocale() const override;
120 PrefService* GetLocalState() const override; 125 PrefService* GetLocalState() const override;
121 void HandleUserOAuthTokenStatusChange( 126 void HandleUserOAuthTokenStatusChange(
122 const std::string& user_id, 127 const std::string& user_id,
123 user_manager::User::OAuthTokenStatus status) const override; 128 user_manager::User::OAuthTokenStatus status) const override;
124 bool IsEnterpriseManaged() const override; 129 bool IsEnterpriseManaged() const override;
125 void LoadPublicAccounts(std::set<std::string>* users_set) override; 130 void LoadPublicAccounts(std::set<std::string>* users_set) override;
126 void NotifyOnLogin() override; 131 void NotifyOnLogin() override;
127 void NotifyUserAddedToSession(const user_manager::User* added_user, 132 void NotifyUserAddedToSession(const user_manager::User* added_user,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // BootstrapManager::Delegate implementation: 204 // BootstrapManager::Delegate implementation:
200 void RemovePendingBootstrapUser(const std::string& user_id) override; 205 void RemovePendingBootstrapUser(const std::string& user_id) override;
201 206
202 // Update the number of users. 207 // Update the number of users.
203 void UpdateNumberOfUsers(); 208 void UpdateNumberOfUsers();
204 209
205 // Starts (or stops) automatic timezone refresh on geolocation, 210 // Starts (or stops) automatic timezone refresh on geolocation,
206 // depending on user preferences. 211 // depending on user preferences.
207 void UpdateUserTimeZoneRefresher(Profile* profile); 212 void UpdateUserTimeZoneRefresher(Profile* profile);
208 213
214 // Returns device affiliation IDs. These IDs are needed to determine if user
215 // is affiliated on the device.
216 std::set<std::string> GetDeviceAffiliationIDs() const;
217
218 // TODO(peletskyi): Remove this backwards compatibility function.
219 // Returns device enterprise domain. Needed for backwards compatibility
220 // until affiliation IDs are fully introduced.
221 std::string GetEnterpriseDomain() const;
222
223 // Returns true if user with |user_affiliation_ids| and |user_email| is
224 // affiliated on current device.
225 bool IsUserAffiliated(const std::set<std::string>& user_affiliation_ids,
226 const std::string& user_email) const;
227
209 // Interface to the signed settings store. 228 // Interface to the signed settings store.
210 CrosSettings* cros_settings_; 229 CrosSettings* cros_settings_;
211 230
212 // Interface to device-local account definitions and associated policy. 231 // Interface to device-local account definitions and associated policy.
213 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; 232 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_;
214 233
215 content::NotificationRegistrar registrar_; 234 content::NotificationRegistrar registrar_;
216 235
217 // User avatar managers. 236 // User avatar managers.
218 UserImageManagerMap user_image_managers_; 237 UserImageManagerMap user_image_managers_;
(...skipping 27 matching lines...) Expand all
246 scoped_ptr<BootstrapManager> bootstrap_manager_; 265 scoped_ptr<BootstrapManager> bootstrap_manager_;
247 266
248 base::WeakPtrFactory<ChromeUserManagerImpl> weak_factory_; 267 base::WeakPtrFactory<ChromeUserManagerImpl> weak_factory_;
249 268
250 DISALLOW_COPY_AND_ASSIGN(ChromeUserManagerImpl); 269 DISALLOW_COPY_AND_ASSIGN(ChromeUserManagerImpl);
251 }; 270 };
252 271
253 } // namespace chromeos 272 } // namespace chromeos
254 273
255 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_ 274 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698