diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-23 01:05:14 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-23 01:05:14 +0000 |
commit | 5dc5b12a05218732918d7276215bd818f4cc0916 (patch) | |
tree | f2a94cec0617b50fd9e9583e89daef8601f095b1 /remoting/host/client_session.h | |
parent | 82752671f55f7eecf069c83c12f31cbe676459df (diff) | |
download | chromium_src-5dc5b12a05218732918d7276215bd818f4cc0916.zip chromium_src-5dc5b12a05218732918d7276215bd818f4cc0916.tar.gz chromium_src-5dc5b12a05218732918d7276215bd818f4cc0916.tar.bz2 |
This CL sets a maximum session duration only for Linux Me2Me, and hard-codes it to 12 hours.
A follow-up CL will get the maximum session duration from a
policy.
BUG=132678
Review URL: https://chromiumcodereview.appspot.com/10629016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/client_session.h')
-rw-r--r-- | remoting/host/client_session.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index e15793a..0fb8532 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h @@ -8,6 +8,7 @@ #include <list> #include "base/time.h" +#include "base/timer.h" #include "base/threading/non_thread_safe.h" #include "remoting/host/remote_input_filter.h" #include "remoting/protocol/clipboard_echo_filter.h" @@ -67,7 +68,8 @@ class ClientSession : public protocol::HostEventStub, ClientSession(EventHandler* event_handler, scoped_ptr<protocol::ConnectionToClient> connection, protocol::HostEventStub* host_event_stub, - Capturer* capturer); + Capturer* capturer, + const base::TimeDelta& max_duration); virtual ~ClientSession(); // protocol::ClipboardStub interface. @@ -167,6 +169,14 @@ class ClientSession : public protocol::HostEventStub, // area, out of this class (crbug.com/96508). Capturer* capturer_; + // The maximum duration of this session. + // There is no maximum if this value is <= 0. + base::TimeDelta max_duration_; + + // A timer that triggers a disconnect when the maximum session duration + // is reached. + base::OneShotTimer<ClientSession> max_duration_timer_; + DISALLOW_COPY_AND_ASSIGN(ClientSession); }; |