| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/protocol/jingle_session.h" | 5 #include "remoting/protocol/jingle_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 switch (message.action) { | 397 switch (message.action) { |
| 398 case JingleMessage::SESSION_ACCEPT: | 398 case JingleMessage::SESSION_ACCEPT: |
| 399 OnAccept(message, reply_callback); | 399 OnAccept(message, reply_callback); |
| 400 break; | 400 break; |
| 401 | 401 |
| 402 case JingleMessage::SESSION_INFO: | 402 case JingleMessage::SESSION_INFO: |
| 403 OnSessionInfo(message, reply_callback); | 403 OnSessionInfo(message, reply_callback); |
| 404 break; | 404 break; |
| 405 | 405 |
| 406 case JingleMessage::TRANSPORT_INFO: | 406 case JingleMessage::TRANSPORT_INFO: |
| 407 if (transport_->ProcessTransportInfo(message.transport_info.get())) { | 407 if (message.transport_info && |
| 408 transport_->ProcessTransportInfo(message.transport_info.get())) { |
| 408 reply_callback.Run(JingleMessageReply::NONE); | 409 reply_callback.Run(JingleMessageReply::NONE); |
| 409 } else { | 410 } else { |
| 410 reply_callback.Run(JingleMessageReply::BAD_REQUEST); | 411 reply_callback.Run(JingleMessageReply::BAD_REQUEST); |
| 411 } | 412 } |
| 412 break; | 413 break; |
| 413 | 414 |
| 414 case JingleMessage::SESSION_TERMINATE: | 415 case JingleMessage::SESSION_TERMINATE: |
| 415 OnTerminate(message, reply_callback); | 416 OnTerminate(message, reply_callback); |
| 416 break; | 417 break; |
| 417 | 418 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 } | 597 } |
| 597 } | 598 } |
| 598 | 599 |
| 599 bool JingleSession::is_session_active() { | 600 bool JingleSession::is_session_active() { |
| 600 return state_ == CONNECTING || state_ == ACCEPTING || state_ == ACCEPTED || | 601 return state_ == CONNECTING || state_ == ACCEPTING || state_ == ACCEPTED || |
| 601 state_ == AUTHENTICATING || state_ == AUTHENTICATED; | 602 state_ == AUTHENTICATING || state_ == AUTHENTICATED; |
| 602 } | 603 } |
| 603 | 604 |
| 604 } // namespace protocol | 605 } // namespace protocol |
| 605 } // namespace remoting | 606 } // namespace remoting |
| OLD | NEW |