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

Side by Side Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 1976263002: Stop asynchronously deleting the network manager in P2PPortAllocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/media/webrtc/peer_connection_dependency_factory.h" 5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 chrome_worker_thread_.task_runner()->PostTask( 394 chrome_worker_thread_.task_runner()->PostTask(
395 FROM_HERE, base::Bind(&FilteringNetworkManager::Initialize, 395 FROM_HERE, base::Bind(&FilteringNetworkManager::Initialize,
396 base::Unretained(filtering_network_manager))); 396 base::Unretained(filtering_network_manager)));
397 } 397 }
398 network_manager.reset(filtering_network_manager); 398 network_manager.reset(filtering_network_manager);
399 } else { 399 } else {
400 network_manager.reset(new EmptyNetworkManager(network_manager_)); 400 network_manager.reset(new EmptyNetworkManager(network_manager_));
401 } 401 }
402 std::unique_ptr<P2PPortAllocator> port_allocator(new P2PPortAllocator( 402 std::unique_ptr<P2PPortAllocator> port_allocator(new P2PPortAllocator(
403 p2p_socket_dispatcher_, std::move(network_manager), socket_factory_.get(), 403 p2p_socket_dispatcher_, std::move(network_manager), socket_factory_.get(),
404 port_config, requesting_origin, chrome_worker_thread_.task_runner())); 404 port_config, requesting_origin));
405 405
406 return GetPcFactory() 406 return GetPcFactory()
407 ->CreatePeerConnection(config, std::move(port_allocator), 407 ->CreatePeerConnection(config, std::move(port_allocator),
408 std::move(identity_store), observer) 408 std::move(identity_store), observer)
409 .get(); 409 .get();
410 } 410 }
411 411
412 // static 412 // static
413 rtc::scoped_refptr<rtc::RTCCertificate> 413 rtc::scoped_refptr<rtc::RTCCertificate>
414 PeerConnectionDependencyFactory::GenerateDefaultCertificate() { 414 PeerConnectionDependencyFactory::GenerateDefaultCertificate() {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 591
592 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 592 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
593 if (audio_device_.get()) 593 if (audio_device_.get())
594 return; 594 return;
595 595
596 audio_device_ = new WebRtcAudioDeviceImpl(); 596 audio_device_ = new WebRtcAudioDeviceImpl();
597 } 597 }
598 598
599 } // namespace content 599 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/p2p/port_allocator.h » ('j') | content/renderer/p2p/port_allocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698