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

Unified Diff: remoting/protocol/pepper_session.cc

Issue 8774017: Add AUTHENTICATED session state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/pepper_session.cc
diff --git a/remoting/protocol/pepper_session.cc b/remoting/protocol/pepper_session.cc
index 735d7adae2e5f37e5e09901ef7b49219d3908fab..e22287dbc06ba0123390954e939320720a133902 100644
--- a/remoting/protocol/pepper_session.cc
+++ b/remoting/protocol/pepper_session.cc
@@ -163,7 +163,7 @@ void PepperSession::set_config(const SessionConfig& config) {
void PepperSession::Close() {
DCHECK(CalledOnValidThread());
- if (state_ == CONNECTING || state_ == CONNECTED) {
+ if (state_ == CONNECTING || state_ == CONNECTED || state_ == AUTHENTICATED) {
// Send session-terminate message.
JingleMessage message(peer_jid_, JingleMessage::SESSION_TERMINATE,
session_id_);
@@ -237,6 +237,9 @@ void PepperSession::OnAccept(const JingleMessage& message,
SetState(CONNECTED);
+ if (authenticator_->state() == Authenticator::ACCEPTED)
+ SetState(AUTHENTICATED);
+
// In case there is transport information in the accept message.
ProcessTransportInfo(message);
}
@@ -274,7 +277,7 @@ void PepperSession::OnTerminate(const JingleMessage& message,
return;
}
- if (state_ == CONNECTED) {
+ if (state_ == CONNECTED || state_ == AUTHENTICATED) {
if (message.reason == JingleMessage::GENERAL_ERROR) {
OnError(CHANNEL_CONNECTION_ERROR);
} else {

Powered by Google App Engine
This is Rietveld 408576698