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

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

Issue 561713002: ash: Add checks for supervised users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Default flag value set in user class constructor. 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
292 protected: 295 protected:
293 // Sets UserManager instance. 296 // Sets UserManager instance.
294 static void SetInstance(UserManager* user_manager); 297 static void SetInstance(UserManager* user_manager);
295 298
296 // Pointer to the existing UserManager instance (if any). 299 // Pointer to the existing UserManager instance (if any).
297 // Usually is set by calling Initialize(), reset by calling Destroy(). 300 // Usually is set by calling Initialize(), reset by calling Destroy().
298 // Not owned since specific implementation of UserManager should decide on its 301 // Not owned since specific implementation of UserManager should decide on its
299 // own appropriate owner. For src/chrome implementation such place is 302 // own appropriate owner. For src/chrome implementation such place is
300 // g_browser_process->platform_part(). 303 // g_browser_process->platform_part().
301 static UserManager* instance; 304 static UserManager* instance;
302 305
303 private: 306 private:
304 friend class chromeos::ScopedUserManagerEnabler; 307 friend class chromeos::ScopedUserManagerEnabler;
305 308
306 // Same as Get() but doesn't won't crash is current instance is NULL. 309 // Same as Get() but doesn't won't crash is current instance is NULL.
307 static UserManager* GetForTesting(); 310 static UserManager* GetForTesting();
308 311
309 // Sets UserManager instance to the given |user_manager|. 312 // Sets UserManager instance to the given |user_manager|.
310 // Returns the previous value of the instance. 313 // Returns the previous value of the instance.
311 static UserManager* SetForTesting(UserManager* user_manager); 314 static UserManager* SetForTesting(UserManager* user_manager);
312 }; 315 };
313 316
314 } // namespace user_manager 317 } // namespace user_manager
315 318
316 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ 319 #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