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

Side by Side Diff: media/cast/test/utility/net_utility.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: 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 | « jingle/glue/proxy_resolving_client_socket.h ('k') | net/android/http_auth_negotiate_android.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 // 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 "media/cast/test/utility/net_utility.h" 5 #include "media/cast/test/utility/net_utility.h"
6 6
7 #include "base/memory/scoped_ptr.h"
7 #include "net/base/ip_address.h" 8 #include "net/base/ip_address.h"
8 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
9 #include "net/udp/udp_server_socket.h" 10 #include "net/udp/udp_server_socket.h"
10 11
11 namespace media { 12 namespace media {
12 namespace cast { 13 namespace cast {
13 namespace test { 14 namespace test {
14 15
15 // TODO(hubbe): Move to /net/. 16 // TODO(hubbe): Move to /net/.
16 net::IPEndPoint GetFreeLocalPort() { 17 net::IPEndPoint GetFreeLocalPort() {
17 scoped_ptr<net::UDPServerSocket> receive_socket( 18 scoped_ptr<net::UDPServerSocket> receive_socket(
18 new net::UDPServerSocket(NULL, net::NetLog::Source())); 19 new net::UDPServerSocket(NULL, net::NetLog::Source()));
19 receive_socket->AllowAddressReuse(); 20 receive_socket->AllowAddressReuse();
20 CHECK_EQ(net::OK, receive_socket->Listen( 21 CHECK_EQ(net::OK, receive_socket->Listen(
21 net::IPEndPoint(net::IPAddress::IPv4Localhost(), 0))); 22 net::IPEndPoint(net::IPAddress::IPv4Localhost(), 0)));
22 net::IPEndPoint endpoint; 23 net::IPEndPoint endpoint;
23 CHECK_EQ(net::OK, receive_socket->GetLocalAddress(&endpoint)); 24 CHECK_EQ(net::OK, receive_socket->GetLocalAddress(&endpoint));
24 return endpoint; 25 return endpoint;
25 } 26 }
26 27
27 } // namespace test 28 } // namespace test
28 } // namespace cast 29 } // namespace cast
29 } // namespace media 30 } // namespace media
OLDNEW
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.h ('k') | net/android/http_auth_negotiate_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698