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

Side by Side Diff: webrtc/p2p/client/basicportallocator.h

Issue 1923163003: Replace scoped_ptr with unique_ptr in webrtc/p2p/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 | « webrtc/p2p/base/turnserver.h ('k') | webrtc/p2p/client/fakeportallocator.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 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ 11 #ifndef WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_
12 #define WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ 12 #define WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_
13 13
14 #include <memory>
14 #include <string> 15 #include <string>
15 #include <vector> 16 #include <vector>
16 17
17 #include "webrtc/p2p/base/portallocator.h" 18 #include "webrtc/p2p/base/portallocator.h"
18 #include "webrtc/base/messagequeue.h" 19 #include "webrtc/base/messagequeue.h"
19 #include "webrtc/base/network.h" 20 #include "webrtc/base/network.h"
20 #include "webrtc/base/scoped_ptr.h" 21 #include "webrtc/base/scoped_ptr.h"
21 #include "webrtc/base/thread.h" 22 #include "webrtc/base/thread.h"
22 23
23 namespace cricket { 24 namespace cricket {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void OnShake(); 179 void OnShake();
179 void MaybeSignalCandidatesAllocationDone(); 180 void MaybeSignalCandidatesAllocationDone();
180 void OnPortAllocationComplete(AllocationSequence* seq); 181 void OnPortAllocationComplete(AllocationSequence* seq);
181 PortData* FindPort(Port* port); 182 PortData* FindPort(Port* port);
182 void GetNetworks(std::vector<rtc::Network*>* networks); 183 void GetNetworks(std::vector<rtc::Network*>* networks);
183 184
184 bool CheckCandidateFilter(const Candidate& c); 185 bool CheckCandidateFilter(const Candidate& c);
185 186
186 BasicPortAllocator* allocator_; 187 BasicPortAllocator* allocator_;
187 rtc::Thread* network_thread_; 188 rtc::Thread* network_thread_;
188 rtc::scoped_ptr<rtc::PacketSocketFactory> owned_socket_factory_; 189 std::unique_ptr<rtc::PacketSocketFactory> owned_socket_factory_;
189 rtc::PacketSocketFactory* socket_factory_; 190 rtc::PacketSocketFactory* socket_factory_;
190 bool allocation_started_; 191 bool allocation_started_;
191 bool network_manager_started_; 192 bool network_manager_started_;
192 bool running_; // set when StartGetAllPorts is called 193 bool running_; // set when StartGetAllPorts is called
193 bool allocation_sequences_created_; 194 bool allocation_sequences_created_;
194 std::vector<PortConfiguration*> configs_; 195 std::vector<PortConfiguration*> configs_;
195 std::vector<AllocationSequence*> sequences_; 196 std::vector<AllocationSequence*> sequences_;
196 std::vector<PortData> ports_; 197 std::vector<PortData> ports_;
197 198
198 friend class AllocationSequence; 199 friend class AllocationSequence;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 void OnPortDestroyed(PortInterface* port); 314 void OnPortDestroyed(PortInterface* port);
314 315
315 BasicPortAllocatorSession* session_; 316 BasicPortAllocatorSession* session_;
316 bool network_removed_ = false; 317 bool network_removed_ = false;
317 rtc::Network* network_; 318 rtc::Network* network_;
318 rtc::IPAddress ip_; 319 rtc::IPAddress ip_;
319 PortConfiguration* config_; 320 PortConfiguration* config_;
320 State state_; 321 State state_;
321 uint32_t flags_; 322 uint32_t flags_;
322 ProtocolList protocols_; 323 ProtocolList protocols_;
323 rtc::scoped_ptr<rtc::AsyncPacketSocket> udp_socket_; 324 std::unique_ptr<rtc::AsyncPacketSocket> udp_socket_;
324 // There will be only one udp port per AllocationSequence. 325 // There will be only one udp port per AllocationSequence.
325 UDPPort* udp_port_; 326 UDPPort* udp_port_;
326 std::vector<TurnPort*> turn_ports_; 327 std::vector<TurnPort*> turn_ports_;
327 int phase_; 328 int phase_;
328 }; 329 };
329 330
330 } // namespace cricket 331 } // namespace cricket
331 332
332 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ 333 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/turnserver.h ('k') | webrtc/p2p/client/fakeportallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698