Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: content/renderer/p2p/port_allocator.cc

Issue 10382003: Changes needed to roll libjingle r141 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 config_(config) { 63 config_(config) {
64 uint32 flags = 0; 64 uint32 flags = 0;
65 if (config_.disable_tcp_transport) 65 if (config_.disable_tcp_transport)
66 flags |= cricket::PORTALLOCATOR_DISABLE_TCP; 66 flags |= cricket::PORTALLOCATOR_DISABLE_TCP;
67 set_flags(flags); 67 set_flags(flags);
68 } 68 }
69 69
70 P2PPortAllocator::~P2PPortAllocator() { 70 P2PPortAllocator::~P2PPortAllocator() {
71 } 71 }
72 72
73 cricket::PortAllocatorSession* P2PPortAllocator::CreateSession( 73 cricket::PortAllocatorSession* P2PPortAllocator::CreateSessionInternal(
74 const std::string& channel_name, 74 const std::string& channel_name,
75 int component) { 75 int component,
76 return new P2PPortAllocatorSession(this, channel_name, component); 76 const std::string& ice_ufrag,
77 const std::string& ice_pwd) {
78 return new P2PPortAllocatorSession(
79 this, channel_name, component, ice_ufrag, ice_pwd);
77 } 80 }
78 81
79 P2PPortAllocatorSession::P2PPortAllocatorSession( 82 P2PPortAllocatorSession::P2PPortAllocatorSession(
80 P2PPortAllocator* allocator, 83 P2PPortAllocator* allocator,
81 const std::string& channel_name, 84 const std::string& channel_name,
82 int component) 85 int component,
83 : cricket::BasicPortAllocatorSession(allocator, channel_name, component), 86 const std::string& ice_ufrag,
87 const std::string& ice_pwd)
88 : cricket::BasicPortAllocatorSession(
89 allocator, channel_name, component, ice_ufrag, ice_pwd),
84 allocator_(allocator), 90 allocator_(allocator),
85 relay_session_attempts_(0), 91 relay_session_attempts_(0),
86 relay_udp_port_(0), 92 relay_udp_port_(0),
87 relay_tcp_port_(0), 93 relay_tcp_port_(0),
88 relay_ssltcp_port_(0) { 94 relay_ssltcp_port_(0) {
89 } 95 }
90 96
91 P2PPortAllocatorSession::~P2PPortAllocatorSession() { 97 P2PPortAllocatorSession::~P2PPortAllocatorSession() {
92 if (stun_address_request_) 98 if (stun_address_request_)
93 stun_address_request_->Cancel(); 99 stun_address_request_->Cancel();
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 talk_base::SocketAddress address(relay_ip_.ip(), relay_ssltcp_port_); 304 talk_base::SocketAddress address(relay_ip_.ip(), relay_ssltcp_port_);
299 ports.push_back(cricket::ProtocolAddress(address, cricket::PROTO_SSLTCP)); 305 ports.push_back(cricket::ProtocolAddress(address, cricket::PROTO_SSLTCP));
300 } 306 }
301 if (!ports.empty()) 307 if (!ports.empty())
302 config->AddRelay(ports, 0.0f); 308 config->AddRelay(ports, 0.0f);
303 } 309 }
304 ConfigReady(config); 310 ConfigReady(config);
305 } 311 }
306 312
307 } // namespace content 313 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698