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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.h

Issue 11499012: Add policy for limiting the session length (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. SessionLengthLimiter is no longer a PKS. Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_USER_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
24 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
25 25
26 class FilePath; 26 class FilePath;
27 class PrefService; 27 class PrefService;
28 class ProfileSyncService; 28 class ProfileSyncService;
29 29
30 namespace chromeos { 30 namespace chromeos {
31 31
32 class RemoveUserDelegate; 32 class RemoveUserDelegate;
33 class SessionLengthLimiter;
33 34
34 // Implementation of the UserManager. 35 // Implementation of the UserManager.
35 class UserManagerImpl : public UserManager, 36 class UserManagerImpl : public UserManager,
36 public ProfileSyncServiceObserver, 37 public ProfileSyncServiceObserver,
37 public content::NotificationObserver { 38 public content::NotificationObserver {
38 public: 39 public:
39 virtual ~UserManagerImpl(); 40 virtual ~UserManagerImpl();
40 41
41 // UserManager implementation: 42 // UserManager implementation:
42 virtual void Shutdown() OVERRIDE; 43 virtual void Shutdown() OVERRIDE;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual bool IsCurrentUserNew() const OVERRIDE; 75 virtual bool IsCurrentUserNew() const OVERRIDE;
75 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const OVERRIDE; 76 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const OVERRIDE;
76 virtual bool CanCurrentUserLock() const OVERRIDE; 77 virtual bool CanCurrentUserLock() const OVERRIDE;
77 virtual bool IsUserLoggedIn() const OVERRIDE; 78 virtual bool IsUserLoggedIn() const OVERRIDE;
78 virtual bool IsLoggedInAsRegularUser() const OVERRIDE; 79 virtual bool IsLoggedInAsRegularUser() const OVERRIDE;
79 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; 80 virtual bool IsLoggedInAsDemoUser() const OVERRIDE;
80 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE; 81 virtual bool IsLoggedInAsPublicAccount() const OVERRIDE;
81 virtual bool IsLoggedInAsGuest() const OVERRIDE; 82 virtual bool IsLoggedInAsGuest() const OVERRIDE;
82 virtual bool IsLoggedInAsStub() const OVERRIDE; 83 virtual bool IsLoggedInAsStub() const OVERRIDE;
83 virtual bool IsSessionStarted() const OVERRIDE; 84 virtual bool IsSessionStarted() const OVERRIDE;
85 virtual bool HasBrowserRestarted() const OVERRIDE;
84 virtual bool IsUserNonCryptohomeDataEphemeral( 86 virtual bool IsUserNonCryptohomeDataEphemeral(
85 const std::string& email) const OVERRIDE; 87 const std::string& email) const OVERRIDE;
86 virtual void AddObserver(UserManager::Observer* obs) OVERRIDE; 88 virtual void AddObserver(UserManager::Observer* obs) OVERRIDE;
87 virtual void RemoveObserver(UserManager::Observer* obs) OVERRIDE; 89 virtual void RemoveObserver(UserManager::Observer* obs) OVERRIDE;
88 virtual void NotifyLocalStateChanged() OVERRIDE; 90 virtual void NotifyLocalStateChanged() OVERRIDE;
89 91
90 // content::NotificationObserver implementation. 92 // content::NotificationObserver implementation.
91 virtual void Observe(int type, 93 virtual void Observe(int type,
92 const content::NotificationSource& source, 94 const content::NotificationSource& source,
93 const content::NotificationDetails& details) OVERRIDE; 95 const content::NotificationDetails& details) OVERRIDE;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // Profile sync service which is observed to take actions after sync 204 // Profile sync service which is observed to take actions after sync
203 // errors appear. NOTE: there is no guarantee that it is the current sync 205 // errors appear. NOTE: there is no guarantee that it is the current sync
204 // service, so do NOT use it outside |OnStateChanged| method. 206 // service, so do NOT use it outside |OnStateChanged| method.
205 ProfileSyncService* observed_sync_service_; 207 ProfileSyncService* observed_sync_service_;
206 208
207 ObserverList<UserManager::Observer> observer_list_; 209 ObserverList<UserManager::Observer> observer_list_;
208 210
209 // User avatar manager. 211 // User avatar manager.
210 scoped_ptr<UserImageManagerImpl> user_image_manager_; 212 scoped_ptr<UserImageManagerImpl> user_image_manager_;
211 213
214 // Session length limiter.
215 scoped_ptr<SessionLengthLimiter> session_length_limiter_;
216
212 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 217 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
213 }; 218 };
214 219
215 } // namespace chromeos 220 } // namespace chromeos
216 221
217 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 222 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698