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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <utility> | 10 #include <utility> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 JingleSession::JingleSession(JingleSessionManager* session_manager) | 66 JingleSession::JingleSession(JingleSessionManager* session_manager) |
67 : session_manager_(session_manager), | 67 : session_manager_(session_manager), |
68 event_handler_(nullptr), | 68 event_handler_(nullptr), |
69 state_(INITIALIZING), | 69 state_(INITIALIZING), |
70 error_(OK), | 70 error_(OK), |
71 weak_factory_(this) { | 71 weak_factory_(this) { |
72 } | 72 } |
73 | 73 |
74 JingleSession::~JingleSession() { | 74 JingleSession::~JingleSession() { |
75 STLDeleteContainerPointers(pending_requests_.begin(), | 75 base::STLDeleteContainerPointers(pending_requests_.begin(), |
76 pending_requests_.end()); | 76 pending_requests_.end()); |
77 STLDeleteContainerPointers(transport_info_requests_.begin(), | 77 base::STLDeleteContainerPointers(transport_info_requests_.begin(), |
78 transport_info_requests_.end()); | 78 transport_info_requests_.end()); |
79 | 79 |
80 session_manager_->SessionDestroyed(this); | 80 session_manager_->SessionDestroyed(this); |
81 } | 81 } |
82 | 82 |
83 void JingleSession::SetEventHandler(Session::EventHandler* event_handler) { | 83 void JingleSession::SetEventHandler(Session::EventHandler* event_handler) { |
84 DCHECK(thread_checker_.CalledOnValidThread()); | 84 DCHECK(thread_checker_.CalledOnValidThread()); |
85 DCHECK(event_handler); | 85 DCHECK(event_handler); |
86 event_handler_ = event_handler; | 86 event_handler_ = event_handler; |
87 } | 87 } |
88 | 88 |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 } | 606 } |
607 } | 607 } |
608 | 608 |
609 bool JingleSession::is_session_active() { | 609 bool JingleSession::is_session_active() { |
610 return state_ == CONNECTING || state_ == ACCEPTING || state_ == ACCEPTED || | 610 return state_ == CONNECTING || state_ == ACCEPTING || state_ == ACCEPTED || |
611 state_ == AUTHENTICATING || state_ == AUTHENTICATED; | 611 state_ == AUTHENTICATING || state_ == AUTHENTICATED; |
612 } | 612 } |
613 | 613 |
614 } // namespace protocol | 614 } // namespace protocol |
615 } // namespace remoting | 615 } // namespace remoting |
OLD | NEW |