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

Side by Side Diff: webrtc/p2p/base/turnserver.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/turnport_unittest.cc ('k') | webrtc/p2p/client/basicportallocator.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 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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_BASE_TURNSERVER_H_ 11 #ifndef WEBRTC_P2P_BASE_TURNSERVER_H_
12 #define WEBRTC_P2P_BASE_TURNSERVER_H_ 12 #define WEBRTC_P2P_BASE_TURNSERVER_H_
13 13
14 #include <list> 14 #include <list>
15 #include <map> 15 #include <map>
16 #include <memory>
16 #include <set> 17 #include <set>
17 #include <string> 18 #include <string>
18 19
19 #include "webrtc/p2p/base/portinterface.h" 20 #include "webrtc/p2p/base/portinterface.h"
20 #include "webrtc/base/asyncpacketsocket.h" 21 #include "webrtc/base/asyncpacketsocket.h"
21 #include "webrtc/base/messagequeue.h" 22 #include "webrtc/base/messagequeue.h"
22 #include "webrtc/base/sigslot.h" 23 #include "webrtc/base/sigslot.h"
23 #include "webrtc/base/socketaddress.h" 24 #include "webrtc/base/socketaddress.h"
24 25
25 namespace rtc { 26 namespace rtc {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void SendExternal(const void* data, size_t size, 119 void SendExternal(const void* data, size_t size,
119 const rtc::SocketAddress& peer); 120 const rtc::SocketAddress& peer);
120 121
121 void OnPermissionDestroyed(Permission* perm); 122 void OnPermissionDestroyed(Permission* perm);
122 void OnChannelDestroyed(Channel* channel); 123 void OnChannelDestroyed(Channel* channel);
123 virtual void OnMessage(rtc::Message* msg); 124 virtual void OnMessage(rtc::Message* msg);
124 125
125 TurnServer* server_; 126 TurnServer* server_;
126 rtc::Thread* thread_; 127 rtc::Thread* thread_;
127 TurnServerConnection conn_; 128 TurnServerConnection conn_;
128 rtc::scoped_ptr<rtc::AsyncPacketSocket> external_socket_; 129 std::unique_ptr<rtc::AsyncPacketSocket> external_socket_;
129 std::string key_; 130 std::string key_;
130 std::string transaction_id_; 131 std::string transaction_id_;
131 std::string username_; 132 std::string username_;
132 std::string origin_; 133 std::string origin_;
133 std::string last_nonce_; 134 std::string last_nonce_;
134 PermissionList perms_; 135 PermissionList perms_;
135 ChannelList channels_; 136 ChannelList channels_;
136 }; 137 };
137 138
138 // An interface through which the MD5 credential hash can be retrieved. 139 // An interface through which the MD5 credential hash can be retrieved.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 std::string software_; 263 std::string software_;
263 TurnAuthInterface* auth_hook_; 264 TurnAuthInterface* auth_hook_;
264 TurnRedirectInterface* redirect_hook_; 265 TurnRedirectInterface* redirect_hook_;
265 // otu - one-time-use. Server will respond with 438 if it's 266 // otu - one-time-use. Server will respond with 438 if it's
266 // sees the same nonce in next transaction. 267 // sees the same nonce in next transaction.
267 bool enable_otu_nonce_; 268 bool enable_otu_nonce_;
268 bool reject_private_addresses_ = false; 269 bool reject_private_addresses_ = false;
269 270
270 InternalSocketMap server_sockets_; 271 InternalSocketMap server_sockets_;
271 ServerSocketMap server_listen_sockets_; 272 ServerSocketMap server_listen_sockets_;
272 rtc::scoped_ptr<rtc::PacketSocketFactory> 273 std::unique_ptr<rtc::PacketSocketFactory> external_socket_factory_;
273 external_socket_factory_;
274 rtc::SocketAddress external_addr_; 274 rtc::SocketAddress external_addr_;
275 275
276 AllocationMap allocations_; 276 AllocationMap allocations_;
277 277
278 // For testing only. If this is non-zero, the next NONCE will be generated 278 // For testing only. If this is non-zero, the next NONCE will be generated
279 // from this value, and it will be reset to 0 after generating the NONCE. 279 // from this value, and it will be reset to 0 after generating the NONCE.
280 int64_t ts_for_next_nonce_ = 0; 280 int64_t ts_for_next_nonce_ = 0;
281 281
282 friend class TurnServerAllocation; 282 friend class TurnServerAllocation;
283 }; 283 };
284 284
285 } // namespace cricket 285 } // namespace cricket
286 286
287 #endif // WEBRTC_P2P_BASE_TURNSERVER_H_ 287 #endif // WEBRTC_P2P_BASE_TURNSERVER_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/turnport_unittest.cc ('k') | webrtc/p2p/client/basicportallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698