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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 config_is_set_(false), | 77 config_is_set_(false), |
78 weak_factory_(this) { | 78 weak_factory_(this) { |
79 } | 79 } |
80 | 80 |
81 JingleSession::~JingleSession() { | 81 JingleSession::~JingleSession() { |
82 channel_multiplexer_.reset(); | 82 channel_multiplexer_.reset(); |
83 STLDeleteContainerPointers(pending_requests_.begin(), | 83 STLDeleteContainerPointers(pending_requests_.begin(), |
84 pending_requests_.end()); | 84 pending_requests_.end()); |
85 STLDeleteContainerPointers(transport_info_requests_.begin(), | 85 STLDeleteContainerPointers(transport_info_requests_.begin(), |
86 transport_info_requests_.end()); | 86 transport_info_requests_.end()); |
| 87 |
| 88 channel_multiplexer_.reset(); |
87 DCHECK(channels_.empty()); | 89 DCHECK(channels_.empty()); |
| 90 |
88 session_manager_->SessionDestroyed(this); | 91 session_manager_->SessionDestroyed(this); |
89 } | 92 } |
90 | 93 |
91 void JingleSession::SetEventHandler(Session::EventHandler* event_handler) { | 94 void JingleSession::SetEventHandler(Session::EventHandler* event_handler) { |
92 DCHECK(CalledOnValidThread()); | 95 DCHECK(CalledOnValidThread()); |
93 DCHECK(event_handler); | 96 DCHECK(event_handler); |
94 event_handler_ = event_handler; | 97 event_handler_ = event_handler; |
95 } | 98 } |
96 | 99 |
97 ErrorCode JingleSession::error() { | 100 ErrorCode JingleSession::error() { |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 674 } |
672 } | 675 } |
673 | 676 |
674 bool JingleSession::is_session_active() { | 677 bool JingleSession::is_session_active() { |
675 return state_ == CONNECTING || state_ == ACCEPTING || state_ == CONNECTED || | 678 return state_ == CONNECTING || state_ == ACCEPTING || state_ == CONNECTED || |
676 state_ == AUTHENTICATING || state_ == AUTHENTICATED; | 679 state_ == AUTHENTICATING || state_ == AUTHENTICATED; |
677 } | 680 } |
678 | 681 |
679 } // namespace protocol | 682 } // namespace protocol |
680 } // namespace remoting | 683 } // namespace remoting |
OLD | NEW |