OLD | NEW |
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 "base/memory/ptr_util.h" |
9 #include "remoting/protocol/transport_context.h" | 9 #include "remoting/protocol/transport_context.h" |
10 #include "remoting/test/fake_network_dispatcher.h" | 10 #include "remoting/test/fake_network_dispatcher.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 socket_factory_.reset( | 74 socket_factory_.reset( |
75 new FakePacketSocketFactory(fake_network_dispatcher.get())); | 75 new FakePacketSocketFactory(fake_network_dispatcher.get())); |
76 network_manager_.reset(new FakeNetworkManager(socket_factory_->GetAddress())); | 76 network_manager_.reset(new FakeNetworkManager(socket_factory_->GetAddress())); |
77 } | 77 } |
78 | 78 |
79 FakePortAllocatorFactory::~FakePortAllocatorFactory() {} | 79 FakePortAllocatorFactory::~FakePortAllocatorFactory() {} |
80 | 80 |
81 std::unique_ptr<cricket::PortAllocator> | 81 std::unique_ptr<cricket::PortAllocator> |
82 FakePortAllocatorFactory::CreatePortAllocator( | 82 FakePortAllocatorFactory::CreatePortAllocator( |
83 scoped_refptr<protocol::TransportContext> transport_context) { | 83 scoped_refptr<protocol::TransportContext> transport_context) { |
84 return base::WrapUnique(new FakePortAllocator( | 84 return base::MakeUnique<FakePortAllocator>( |
85 network_manager_.get(), socket_factory_.get(), transport_context)); | 85 network_manager_.get(), socket_factory_.get(), transport_context); |
86 } | 86 } |
87 | 87 |
88 } // namespace remoting | 88 } // namespace remoting |
OLD | NEW |