Chromium Code Reviews| Index: remoting/host/chromoting_host.h |
| diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h |
| index 39d2ce684416fade689bdc2bd2b7563c55e834fd..96ced5fd35055d7505e96fd45044968fce8736f6 100644 |
| --- a/remoting/host/chromoting_host.h |
| +++ b/remoting/host/chromoting_host.h |
| @@ -115,10 +115,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| protocol::Session* session, |
| protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE; |
| - void AddAuthenticatedClient(ClientSession* client, |
| - const protocol::SessionConfig& config, |
| - const std::string& jid); |
| - |
| // Sets desired configuration for the protocol. Ownership of the |
| // |config| is transferred to the object. Must be called before Start(). |
| void set_protocol_config(protocol::CandidateSessionConfig* config); |
| @@ -167,9 +163,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| bool allow_nat_traversal); |
| virtual ~ChromotingHost(); |
| - // This method is called if a client is disconnected from the host. |
| - void OnClientDisconnected(ClientSession* client); |
| - |
| // Creates encoder for the specified configuration. |
| Encoder* CreateEncoder(const protocol::SessionConfig& config); |
| @@ -182,9 +175,7 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| void StopScreenRecorder(); |
| void OnScreenRecorderStopped(); |
| - // The following methods are called during shutdown. |
| - void ShutdownNetwork(); |
| - void ShutdownRecorder(); |
| + // Called from Shutdown() or OnScreenRecorderStopped() to finish shutdown. |
| void ShutdownFinish(); |
| // Parameters specified when the host was created. |
| @@ -201,23 +192,26 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| StatusObserverList status_observers_; |
| - // The connections to remote clients. |
| + // The connections to remote clients. Must be used only on the |
| + // network thread. |
| ClientList clients_; |
| - // Session manager for the host process. |
| + // Session manager for the host process. Must be used only on the |
| + // network thread. |
|
Wez
2011/11/09 02:32:22
nit: Consider bundling all the members which are n
Sergey Ulanov
2011/11/09 21:24:00
Done. Practically all members of this class are us
|
| scoped_refptr<ScreenRecorder> recorder_; |
| - // Tracks the internal state of the host. |
| - // This variable is written on the main thread of ChromotingHostContext |
| - // and read by jingle thread. |
| - State state_; |
| - |
| // Number of screen recorders that are currently being |
| // stopped. Normally set to 0 or 1, but in some cases it may be |
| // greater than 1, particularly if when second client can connect |
| - // immidiately after previous one disconnected. |
| + // immidiately after previous one disconnected. Must be used only on |
| + // the network thread. |
| int stopping_recorders_; |
| + // Tracks the internal state of the host. |
| + // This variable is written on the main thread of ChromotingHostContext |
| + // and read on the network thread. |
| + State state_; |
| + |
| // Lock is to lock the access to |state_|. |
| base::Lock lock_; |