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

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

Issue 575653002: Revert of ash: Add checks for supervised users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/user_manager/user.cc ('k') | components/user_manager/user_manager_base.h » ('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_USER_MANAGER_H_ 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_H_
6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/user_manager/user.h" 10 #include "components/user_manager/user.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 virtual void RemoveObserver(Observer* obs) = 0; 282 virtual void RemoveObserver(Observer* obs) = 0;
283 283
284 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; 284 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0;
285 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; 285 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0;
286 286
287 virtual void NotifyLocalStateChanged() = 0; 287 virtual void NotifyLocalStateChanged() = 0;
288 288
289 // Returns true if supervised users allowed. 289 // Returns true if supervised users allowed.
290 virtual bool AreSupervisedUsersAllowed() const = 0; 290 virtual bool AreSupervisedUsersAllowed() const = 0;
291 291
292 // Force update login state.
293 virtual void ForceUpdateState() {}
294
295 protected: 292 protected:
296 // Sets UserManager instance. 293 // Sets UserManager instance.
297 static void SetInstance(UserManager* user_manager); 294 static void SetInstance(UserManager* user_manager);
298 295
299 // Pointer to the existing UserManager instance (if any). 296 // Pointer to the existing UserManager instance (if any).
300 // Usually is set by calling Initialize(), reset by calling Destroy(). 297 // Usually is set by calling Initialize(), reset by calling Destroy().
301 // Not owned since specific implementation of UserManager should decide on its 298 // Not owned since specific implementation of UserManager should decide on its
302 // own appropriate owner. For src/chrome implementation such place is 299 // own appropriate owner. For src/chrome implementation such place is
303 // g_browser_process->platform_part(). 300 // g_browser_process->platform_part().
304 static UserManager* instance; 301 static UserManager* instance;
305 302
306 private: 303 private:
307 friend class chromeos::ScopedUserManagerEnabler; 304 friend class chromeos::ScopedUserManagerEnabler;
308 305
309 // Same as Get() but doesn't won't crash is current instance is NULL. 306 // Same as Get() but doesn't won't crash is current instance is NULL.
310 static UserManager* GetForTesting(); 307 static UserManager* GetForTesting();
311 308
312 // Sets UserManager instance to the given |user_manager|. 309 // Sets UserManager instance to the given |user_manager|.
313 // Returns the previous value of the instance. 310 // Returns the previous value of the instance.
314 static UserManager* SetForTesting(UserManager* user_manager); 311 static UserManager* SetForTesting(UserManager* user_manager);
315 }; 312 };
316 313
317 } // namespace user_manager 314 } // namespace user_manager
318 315
319 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ 316 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « components/user_manager/user.cc ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698