Chromium Code Reviews| Index: ash/session/session_controller.h |
| diff --git a/ash/session/session_controller.h b/ash/session/session_controller.h |
| index 7f6cd864bbbd81fa159e3f0b131a775c9ea360f4..392aa7c495f7e6207e7d8c9881804794159cffef 100644 |
| --- a/ash/session/session_controller.h |
| +++ b/ash/session/session_controller.h |
| @@ -17,6 +17,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/observer_list.h" |
| +#include "base/time/time.h" |
| #include "mojo/public/cpp/bindings/binding_set.h" |
| class AccountId; |
| @@ -34,6 +35,9 @@ class ASH_EXPORT SessionController |
| SessionController(); |
| ~SessionController() override; |
| + base::TimeDelta session_length_limit() const { return session_length_limit_; } |
| + base::TimeTicks session_start_time() const { return session_start_time_; } |
| + |
| // Binds the mojom::SessionControllerRequest to this object. |
| void BindRequest(mojom::SessionControllerRequest request); |
| @@ -124,6 +128,8 @@ class ASH_EXPORT SessionController |
| void NotifyChromeLockAnimationsComplete() override; |
| void RunUnlockAnimation(RunUnlockAnimationCallback callback) override; |
| void NotifyChromeTerminating() override; |
| + void SetSessionLengthLimit(base::TimeDelta length_limit, |
| + base::TimeTicks start_time) override; |
| // Test helpers. |
| void ClearUserSessionsForTest(); |
| @@ -180,6 +186,14 @@ class ASH_EXPORT SessionController |
| // Pending callback for the StartLock request. |
| base::OnceCallback<void(bool)> start_lock_callback_; |
| + // Zero if there is no session length limit. |
|
msw
2017/06/06 19:01:04
nit: "The session length limit; set to zero if the
James Cook
2017/06/07 00:48:13
Done.
|
| + base::TimeDelta session_length_limit_; |
| + |
| + // Stored in a pref in case of a crash in the middle of the session. Can |
|
msw
2017/06/06 19:01:04
nit: "The session start time, set at login or on t
James Cook
2017/06/07 00:48:13
Done.
|
| + // either be login time or the time of first user activity. Null when there |
| + // is no session length limit. |
| + base::TimeTicks session_start_time_; |
| + |
| base::ObserverList<ash::SessionObserver> observers_; |
| base::WeakPtrFactory<SessionController> weak_ptr_factory_; |