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

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

Issue 1851933002: Convert //url to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup 7 Created 4 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
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 <stdint.h> 7 #include <stdint.h>
8
9 #include <memory>
8 #include <utility> 10 #include <utility>
9 11
10 #include "base/command_line.h" 12 #include "base/command_line.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
13 #include "content/renderer/p2p/socket_dispatcher.h" 15 #include "content/renderer/p2p/socket_dispatcher.h"
14 16
15 namespace content { 17 namespace content {
16 18
17 P2PPortAllocator::P2PPortAllocator( 19 P2PPortAllocator::P2PPortAllocator(
18 const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher, 20 const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher,
19 scoped_ptr<rtc::NetworkManager> network_manager, 21 std::unique_ptr<rtc::NetworkManager> network_manager,
20 rtc::PacketSocketFactory* socket_factory, 22 rtc::PacketSocketFactory* socket_factory,
21 const Config& config, 23 const Config& config,
22 const GURL& origin, 24 const GURL& origin,
23 const scoped_refptr<base::SingleThreadTaskRunner> task_runner) 25 const scoped_refptr<base::SingleThreadTaskRunner> task_runner)
24 : cricket::BasicPortAllocator(network_manager.get(), socket_factory), 26 : cricket::BasicPortAllocator(network_manager.get(), socket_factory),
25 network_manager_(std::move(network_manager)), 27 network_manager_(std::move(network_manager)),
26 socket_dispatcher_(socket_dispatcher), 28 socket_dispatcher_(socket_dispatcher),
27 config_(config), 29 config_(config),
28 origin_(origin), 30 origin_(origin),
29 network_manager_task_runner_(task_runner) { 31 network_manager_task_runner_(task_runner) {
(...skipping 22 matching lines...) Expand all
52 // TODO(guoweis): P2PPortAllocator is also deleted in the wrong thread 54 // TODO(guoweis): P2PPortAllocator is also deleted in the wrong thread
53 // here. It's created in signaling thread, and held by webrtc::PeerConnection, 55 // here. It's created in signaling thread, and held by webrtc::PeerConnection,
54 // only used on worker thread. The destructor is invoked on signaling thread 56 // only used on worker thread. The destructor is invoked on signaling thread
55 // again. crbug.com/535761. DeleteSoon can be removed once the bug is fixed. 57 // again. crbug.com/535761. DeleteSoon can be removed once the bug is fixed.
56 P2PPortAllocator::~P2PPortAllocator() { 58 P2PPortAllocator::~P2PPortAllocator() {
57 network_manager_task_runner_->DeleteSoon(FROM_HERE, 59 network_manager_task_runner_->DeleteSoon(FROM_HERE,
58 network_manager_.release()); 60 network_manager_.release());
59 } 61 }
60 62
61 } // namespace content 63 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/p2p/port_allocator.h ('k') | content/renderer/shared_worker/embedded_shared_worker_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698