Index: remoting/protocol/session.h |
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h |
index 4640fad7898df45f6d1754e8c4b81b516786ee8e..fa45f842afa3eb904ad5709c8ea7ecd78c86dd90 100644 |
--- a/remoting/protocol/session.h |
+++ b/remoting/protocol/session.h |
@@ -38,9 +38,12 @@ class Session : public base::NonThreadSafe { |
// session-accept. |
Wez
2011/12/03 00:10:37
Combining this description with those of CONNECTED
Sergey Ulanov
2011/12/06 02:33:20
I think we do need to distinguish between CONNECTE
|
CONNECTING, |
- // Session has been accepted. |
+ // Session has been accepted, but authentication is not finished yet. |
Wez
2011/12/03 00:10:37
nit: "... and is pending authentication."
Sergey Ulanov
2011/12/06 02:33:20
Done.
|
CONNECTED, |
+ // Session has been connected and authenticated. |
+ AUTHENTICATED, |
+ |
// Session has been closed. |
CLOSED, |
@@ -58,7 +61,10 @@ class Session : public base::NonThreadSafe { |
CHANNEL_CONNECTION_ERROR, |
}; |
- typedef base::Callback<void(State)> StateChangeCallback; |
+ // State change callbacks are called after session state has |
+ // changed. Handlers can destroy session only when |state| is set to |
+ // CLOSED or FAILED. |
Wez
2011/12/03 00:10:37
nit: "It is not safe to destroy the session from w
Sergey Ulanov
2011/12/06 02:33:20
Done.
|
+ typedef base::Callback<void(State state)> StateChangeCallback; |
// TODO(sergeyu): Specify connection error code when channel |
// connection fails. |
@@ -80,8 +86,8 @@ class Session : public base::NonThreadSafe { |
// callback is called with NULL if connection failed for any reason. |
// Ownership of the channel socket is given to the caller when the |
// callback is called. All channels must be destroyed before the |
- // session is destroyed. Can be called only when in CONNECTING or |
- // CONNECTED state. |
+ // session is destroyed. Can be called only when in CONNECTING, |
+ // CONNECTED or AUTHENTICATED states. |
virtual void CreateStreamChannel( |
const std::string& name, const StreamChannelCallback& callback) = 0; |
virtual void CreateDatagramChannel( |