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

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

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_network_manager.h ('k') | remoting/test/fake_port_allocator.cc » ('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 #ifndef REMOTING_TEST_FAKE_PORT_ALLOCATOR_H_ 5 #ifndef REMOTING_TEST_FAKE_PORT_ALLOCATOR_H_
6 #define REMOTING_TEST_FAKE_PORT_ALLOCATOR_H_ 6 #define REMOTING_TEST_FAKE_PORT_ALLOCATOR_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "remoting/protocol/port_allocator_factory.h" 13 #include "remoting/protocol/port_allocator_factory.h"
14 #include "third_party/webrtc/p2p/client/basicportallocator.h" 14 #include "third_party/webrtc/p2p/client/basicportallocator.h"
15 15
16 namespace remoting { 16 namespace remoting {
17 17
18 class FakeNetworkDispatcher; 18 class FakeNetworkDispatcher;
19 class FakePacketSocketFactory; 19 class FakePacketSocketFactory;
20 20
21 class FakePortAllocator : public cricket::BasicPortAllocator { 21 class FakePortAllocator : public cricket::BasicPortAllocator {
22 public: 22 public:
(...skipping 18 matching lines...) Expand all
41 41
42 class FakePortAllocatorFactory : public protocol::PortAllocatorFactory { 42 class FakePortAllocatorFactory : public protocol::PortAllocatorFactory {
43 public: 43 public:
44 FakePortAllocatorFactory( 44 FakePortAllocatorFactory(
45 scoped_refptr<FakeNetworkDispatcher> fake_network_dispatcher); 45 scoped_refptr<FakeNetworkDispatcher> fake_network_dispatcher);
46 ~FakePortAllocatorFactory() override; 46 ~FakePortAllocatorFactory() override;
47 47
48 FakePacketSocketFactory* socket_factory() { return socket_factory_.get(); } 48 FakePacketSocketFactory* socket_factory() { return socket_factory_.get(); }
49 49
50 // PortAllocatorFactory interface. 50 // PortAllocatorFactory interface.
51 scoped_ptr<cricket::PortAllocator> CreatePortAllocator( 51 std::unique_ptr<cricket::PortAllocator> CreatePortAllocator(
52 scoped_refptr<protocol::TransportContext> transport_context) override; 52 scoped_refptr<protocol::TransportContext> transport_context) override;
53 53
54 private: 54 private:
55 scoped_ptr<rtc::NetworkManager> network_manager_; 55 std::unique_ptr<rtc::NetworkManager> network_manager_;
56 scoped_ptr<FakePacketSocketFactory> socket_factory_; 56 std::unique_ptr<FakePacketSocketFactory> socket_factory_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorFactory); 58 DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorFactory);
59 }; 59 };
60 60
61 } // namespace remoting 61 } // namespace remoting
62 62
63 #endif // REMOTING_TEST_FAKE_PORT_ALLOCATOR_H_ 63 #endif // REMOTING_TEST_FAKE_PORT_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « remoting/test/fake_network_manager.h ('k') | remoting/test/fake_port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698