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

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

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 #ifndef CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ 5 #ifndef CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_
6 #define CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ 6 #define CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
11 #include "third_party/webrtc/p2p/client/basicportallocator.h" 13 #include "third_party/webrtc/p2p/client/basicportallocator.h"
12 #include "url/gurl.h" 14 #include "url/gurl.h"
13 15
14 namespace content { 16 namespace content {
15 17
16 class P2PSocketDispatcher; 18 class P2PSocketDispatcher;
17 19
(...skipping 13 matching lines...) Expand all
31 bool enable_multiple_routes = true; 33 bool enable_multiple_routes = true;
32 34
33 // Enable exposing the default local address when set to true. This is 35 // Enable exposing the default local address when set to true. This is
34 // only in effect when the |enable_multiple_routes| is false or the 36 // only in effect when the |enable_multiple_routes| is false or the
35 // permission check of mic/camera is denied. 37 // permission check of mic/camera is denied.
36 bool enable_default_local_candidate = true; 38 bool enable_default_local_candidate = true;
37 }; 39 };
38 40
39 P2PPortAllocator( 41 P2PPortAllocator(
40 const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher, 42 const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher,
41 scoped_ptr<rtc::NetworkManager> network_manager, 43 std::unique_ptr<rtc::NetworkManager> network_manager,
42 rtc::PacketSocketFactory* socket_factory, 44 rtc::PacketSocketFactory* socket_factory,
43 const Config& config, 45 const Config& config,
44 const GURL& origin, 46 const GURL& origin,
45 const scoped_refptr<base::SingleThreadTaskRunner> task_runner); 47 const scoped_refptr<base::SingleThreadTaskRunner> task_runner);
46 ~P2PPortAllocator() override; 48 ~P2PPortAllocator() override;
47 49
48 private: 50 private:
49 scoped_ptr<rtc::NetworkManager> network_manager_; 51 std::unique_ptr<rtc::NetworkManager> network_manager_;
50 scoped_refptr<P2PSocketDispatcher> socket_dispatcher_; 52 scoped_refptr<P2PSocketDispatcher> socket_dispatcher_;
51 Config config_; 53 Config config_;
52 GURL origin_; 54 GURL origin_;
53 55
54 // This is the thread |network_manager_| is associated with and must be used 56 // This is the thread |network_manager_| is associated with and must be used
55 // to delete |network_manager_|. 57 // to delete |network_manager_|.
56 const scoped_refptr<base::SingleThreadTaskRunner> 58 const scoped_refptr<base::SingleThreadTaskRunner>
57 network_manager_task_runner_; 59 network_manager_task_runner_;
58 60
59 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator); 61 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator);
60 }; 62 };
61 63
62 } // namespace content 64 } // namespace content
63 65
64 #endif // CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ 66 #endif // CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « content/renderer/manifest/manifest_parser_unittest.cc ('k') | content/renderer/p2p/port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698