OLD | NEW |
1 // Copyright (c) 2011 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_manager.h" | 5 #include "remoting/protocol/jingle_session_manager.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
(...skipping 16 matching lines...) Expand all Loading... |
28 namespace remoting { | 28 namespace remoting { |
29 namespace protocol { | 29 namespace protocol { |
30 | 30 |
31 JingleSessionManager::JingleSessionManager( | 31 JingleSessionManager::JingleSessionManager( |
32 base::MessageLoopProxy* message_loop) | 32 base::MessageLoopProxy* message_loop) |
33 : message_loop_(message_loop), | 33 : message_loop_(message_loop), |
34 signal_strategy_(NULL), | 34 signal_strategy_(NULL), |
35 allow_nat_traversal_(false), | 35 allow_nat_traversal_(false), |
36 ready_(false), | 36 ready_(false), |
37 http_port_allocator_(NULL), | 37 http_port_allocator_(NULL), |
38 closed_(false), | 38 closed_(false) { |
39 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) { | |
40 } | 39 } |
41 | 40 |
42 JingleSessionManager::~JingleSessionManager() { | 41 JingleSessionManager::~JingleSessionManager() { |
43 // Session manager can be destroyed only after all sessions are destroyed. | 42 // Session manager can be destroyed only after all sessions are destroyed. |
44 DCHECK(sessions_.empty()); | 43 DCHECK(sessions_.empty()); |
45 Close(); | 44 Close(); |
46 } | 45 } |
47 | 46 |
48 void JingleSessionManager::Init( | 47 void JingleSessionManager::Init( |
49 SignalStrategy* signal_strategy, | 48 SignalStrategy* signal_strategy, |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 cricket::WriteError* error) { | 257 cricket::WriteError* error) { |
259 const ContentDescription* desc = | 258 const ContentDescription* desc = |
260 static_cast<const ContentDescription*>(content); | 259 static_cast<const ContentDescription*>(content); |
261 | 260 |
262 *elem = desc->ToXml(); | 261 *elem = desc->ToXml(); |
263 return true; | 262 return true; |
264 } | 263 } |
265 | 264 |
266 } // namespace protocol | 265 } // namespace protocol |
267 } // namespace remoting | 266 } // namespace remoting |
OLD | NEW |