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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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_util.h" 9 #include "base/string_util.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } else if (key == "relay.ssltcp_port") { 275 } else if (key == "relay.ssltcp_port") {
276 if (!ParsePortNumber(value, &relay_ssltcp_port_)) 276 if (!ParsePortNumber(value, &relay_ssltcp_port_))
277 return; 277 return;
278 } 278 }
279 } 279 }
280 280
281 AddConfig(); 281 AddConfig();
282 } 282 }
283 283
284 void P2PPortAllocatorSession::AddConfig() { 284 void P2PPortAllocatorSession::AddConfig() {
285 cricket::PortConfiguration* config = 285 cricket::PortConfiguration* config = new cricket::PortConfiguration(
286 new cricket::PortConfiguration(stun_server_address_, "", ""); 286 stun_server_address_, std::string(), std::string());
287 287
288 if (allocator_->config_.legacy_relay) { 288 if (allocator_->config_.legacy_relay) {
289 // Passing empty credentials for legacy google relay. 289 // Passing empty credentials for legacy google relay.
290 cricket::RelayServerConfig gturn_config(cricket::RELAY_GTURN); 290 cricket::RelayServerConfig gturn_config(cricket::RELAY_GTURN);
291 if (relay_ip_.ip() != 0) { 291 if (relay_ip_.ip() != 0) {
292 if (relay_udp_port_ > 0) { 292 if (relay_udp_port_ > 0) {
293 talk_base::SocketAddress address(relay_ip_.ip(), relay_udp_port_); 293 talk_base::SocketAddress address(relay_ip_.ip(), relay_udp_port_);
294 gturn_config.ports.push_back(cricket::ProtocolAddress( 294 gturn_config.ports.push_back(cricket::ProtocolAddress(
295 address, cricket::PROTO_UDP)); 295 address, cricket::PROTO_UDP));
296 } 296 }
(...skipping 28 matching lines...) Expand all
325 // Using the stun resolved address if available for TURN. 325 // Using the stun resolved address if available for TURN.
326 turn_config.ports.push_back(cricket::ProtocolAddress( 326 turn_config.ports.push_back(cricket::ProtocolAddress(
327 stun_server_address_, cricket::PROTO_UDP)); 327 stun_server_address_, cricket::PROTO_UDP));
328 config->AddRelay(turn_config); 328 config->AddRelay(turn_config);
329 } 329 }
330 } 330 }
331 ConfigReady(config); 331 ConfigReady(config);
332 } 332 }
333 333
334 } // namespace content 334 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/peer_connection_tracker.cc ('k') | content/renderer/pepper/pepper_device_enumeration_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698