| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/jingle_glue/http_port_allocator.h" |
| 6 |
| 7 namespace remoting { |
| 8 |
| 9 PortAllocatorSessionFactory::~PortAllocatorSessionFactory() { |
| 10 } |
| 11 |
| 12 HttpPortAllocator::HttpPortAllocator( |
| 13 talk_base::NetworkManager* network_manager, |
| 14 talk_base::PacketSocketFactory* socket_factory, |
| 15 PortAllocatorSessionFactory* session_factory, |
| 16 const std::string &user_agent) |
| 17 : cricket::HttpPortAllocator(network_manager, |
| 18 socket_factory, |
| 19 user_agent), |
| 20 session_factory_(session_factory) { |
| 21 } |
| 22 |
| 23 HttpPortAllocator::~HttpPortAllocator() { |
| 24 } |
| 25 |
| 26 cricket::PortAllocatorSession *HttpPortAllocator::CreateSession( |
| 27 const std::string& name, const std::string& session_type) { |
| 28 if (session_factory_) { |
| 29 return session_factory_->CreateSession( |
| 30 this, name, session_type, stun_hosts(), relay_hosts(), relay_token(), |
| 31 user_agent()); |
| 32 } |
| 33 return new cricket::HttpPortAllocatorSession( |
| 34 this, name, session_type, stun_hosts(), relay_hosts(), relay_token(), |
| 35 user_agent()); |
| 36 } |
| 37 |
| 38 } // namespace remoting |
| OLD | NEW |