| 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 "content/renderer/p2p/port_allocator.h" | 5 #include "content/renderer/p2p/port_allocator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return new P2PPortAllocatorSession( | 76 return new P2PPortAllocatorSession( |
| 77 this, component, ice_username_fragment, ice_password); | 77 this, component, ice_username_fragment, ice_password); |
| 78 } | 78 } |
| 79 | 79 |
| 80 P2PPortAllocatorSession::P2PPortAllocatorSession( | 80 P2PPortAllocatorSession::P2PPortAllocatorSession( |
| 81 P2PPortAllocator* allocator, | 81 P2PPortAllocator* allocator, |
| 82 int component, | 82 int component, |
| 83 const std::string& ice_username_fragment, | 83 const std::string& ice_username_fragment, |
| 84 const std::string& ice_password) | 84 const std::string& ice_password) |
| 85 : cricket::BasicPortAllocatorSession( | 85 : cricket::BasicPortAllocatorSession( |
| 86 allocator, component, | 86 allocator, "", component, |
| 87 ice_username_fragment, ice_password), | 87 ice_username_fragment, ice_password), |
| 88 allocator_(allocator), | 88 allocator_(allocator), |
| 89 relay_session_attempts_(0), | 89 relay_session_attempts_(0), |
| 90 relay_udp_port_(0), | 90 relay_udp_port_(0), |
| 91 relay_tcp_port_(0), | 91 relay_tcp_port_(0), |
| 92 relay_ssltcp_port_(0) { | 92 relay_ssltcp_port_(0) { |
| 93 } | 93 } |
| 94 | 94 |
| 95 P2PPortAllocatorSession::~P2PPortAllocatorSession() { | 95 P2PPortAllocatorSession::~P2PPortAllocatorSession() { |
| 96 if (stun_address_request_) | 96 if (stun_address_request_) |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 talk_base::SocketAddress address(relay_ip_.ip(), relay_ssltcp_port_); | 294 talk_base::SocketAddress address(relay_ip_.ip(), relay_ssltcp_port_); |
| 295 ports.push_back(cricket::ProtocolAddress(address, cricket::PROTO_SSLTCP)); | 295 ports.push_back(cricket::ProtocolAddress(address, cricket::PROTO_SSLTCP)); |
| 296 } | 296 } |
| 297 if (!ports.empty()) | 297 if (!ports.empty()) |
| 298 config->AddRelay(ports, 0.0f); | 298 config->AddRelay(ports, 0.0f); |
| 299 } | 299 } |
| 300 ConfigReady(config); | 300 ConfigReady(config); |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace content | 303 } // namespace content |
| OLD | NEW |