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

Side by Side Diff: remoting/test/fake_port_allocator.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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
« no previous file with comments | « remoting/test/fake_port_allocator.h ('k') | remoting/test/fake_socket_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "remoting/test/fake_port_allocator.h" 5 #include "remoting/test/fake_port_allocator.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h"
8 #include "remoting/protocol/transport_context.h" 9 #include "remoting/protocol/transport_context.h"
9 #include "remoting/test/fake_network_dispatcher.h" 10 #include "remoting/test/fake_network_dispatcher.h"
10 #include "remoting/test/fake_network_manager.h" 11 #include "remoting/test/fake_network_manager.h"
11 #include "remoting/test/fake_socket_factory.h" 12 #include "remoting/test/fake_socket_factory.h"
12 #include "third_party/webrtc/p2p/client/basicportallocator.h" 13 #include "third_party/webrtc/p2p/client/basicportallocator.h"
13 14
14 namespace remoting { 15 namespace remoting {
15 16
16 namespace { 17 namespace {
17 18
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 71
71 FakePortAllocatorFactory::FakePortAllocatorFactory( 72 FakePortAllocatorFactory::FakePortAllocatorFactory(
72 scoped_refptr<FakeNetworkDispatcher> fake_network_dispatcher) { 73 scoped_refptr<FakeNetworkDispatcher> fake_network_dispatcher) {
73 socket_factory_.reset( 74 socket_factory_.reset(
74 new FakePacketSocketFactory(fake_network_dispatcher.get())); 75 new FakePacketSocketFactory(fake_network_dispatcher.get()));
75 network_manager_.reset(new FakeNetworkManager(socket_factory_->GetAddress())); 76 network_manager_.reset(new FakeNetworkManager(socket_factory_->GetAddress()));
76 } 77 }
77 78
78 FakePortAllocatorFactory::~FakePortAllocatorFactory() {} 79 FakePortAllocatorFactory::~FakePortAllocatorFactory() {}
79 80
80 scoped_ptr<cricket::PortAllocator> 81 std::unique_ptr<cricket::PortAllocator>
81 FakePortAllocatorFactory::CreatePortAllocator( 82 FakePortAllocatorFactory::CreatePortAllocator(
82 scoped_refptr<protocol::TransportContext> transport_context) { 83 scoped_refptr<protocol::TransportContext> transport_context) {
83 return make_scoped_ptr(new FakePortAllocator( 84 return base::WrapUnique(new FakePortAllocator(
84 network_manager_.get(), socket_factory_.get(), transport_context)); 85 network_manager_.get(), socket_factory_.get(), transport_context));
85 } 86 }
86 87
87 } // namespace remoting 88 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/fake_port_allocator.h ('k') | remoting/test/fake_socket_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698