| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 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 http_port_allocator_(NULL), | 36 http_port_allocator_(NULL), |
| 37 closed_(false), | 37 closed_(false) { |
| 38 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) { | |
| 39 } | 38 } |
| 40 | 39 |
| 41 JingleSessionManager::~JingleSessionManager() { | 40 JingleSessionManager::~JingleSessionManager() { |
| 42 // Session manager can be destroyed only after all sessions are destroyed. | 41 // Session manager can be destroyed only after all sessions are destroyed. |
| 43 DCHECK(sessions_.empty()); | 42 DCHECK(sessions_.empty()); |
| 44 Close(); | 43 Close(); |
| 45 } | 44 } |
| 46 | 45 |
| 47 void JingleSessionManager::Init( | 46 void JingleSessionManager::Init( |
| 48 const std::string& local_jid, | 47 const std::string& local_jid, |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 cricket::WriteError* error) { | 244 cricket::WriteError* error) { |
| 246 const ContentDescription* desc = | 245 const ContentDescription* desc = |
| 247 static_cast<const ContentDescription*>(content); | 246 static_cast<const ContentDescription*>(content); |
| 248 | 247 |
| 249 *elem = desc->ToXml(); | 248 *elem = desc->ToXml(); |
| 250 return true; | 249 return true; |
| 251 } | 250 } |
| 252 | 251 |
| 253 } // namespace protocol | 252 } // namespace protocol |
| 254 } // namespace remoting | 253 } // namespace remoting |
| OLD | NEW |