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

Side by Side Diff: net/dns/mdns_client.cc

Issue 657013003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « net/dns/mapped_host_resolver_unittest.cc ('k') | net/http/http_network_transaction_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/dns/mdns_client.h" 5 #include "net/dns/mdns_client.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/dns/dns_protocol.h" 8 #include "net/dns/dns_protocol.h"
9 #include "net/dns/mdns_client_impl.h" 9 #include "net/dns/mdns_client_impl.h"
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 scoped_ptr<DatagramServerSocket> socket( 89 scoped_ptr<DatagramServerSocket> socket(
90 new UDPServerSocket(NULL, NetLog::Source())); 90 new UDPServerSocket(NULL, NetLog::Source()));
91 91
92 IPEndPoint multicast_addr = GetMDnsIPEndPoint(address_family); 92 IPEndPoint multicast_addr = GetMDnsIPEndPoint(address_family);
93 int rv = Bind(multicast_addr, interface_index, socket.get()); 93 int rv = Bind(multicast_addr, interface_index, socket.get());
94 if (rv != OK) { 94 if (rv != OK) {
95 socket.reset(); 95 socket.reset();
96 VLOG(1) << "Bind failed, endpoint=" << multicast_addr.ToStringWithoutPort() 96 VLOG(1) << "Bind failed, endpoint=" << multicast_addr.ToStringWithoutPort()
97 << ", error=" << rv; 97 << ", error=" << rv;
98 } 98 }
99 return socket.PassAs<DatagramServerSocket>(); 99 return socket.Pass();
100 } 100 }
101 101
102 } // namespace net 102 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/mapped_host_resolver_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698