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

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

Issue 1147903003: Subsituting pattern ScopedVector push_back.(ptr.release()) with push_back(ptr.Pass()) in net/dns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « net/dns/host_resolver_mojo_unittest.cc ('k') | net/dns/mock_mdns_socket_factory.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_impl.h" 5 #include "net/dns/mdns_client_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void MDnsSocketFactoryImpl::CreateSockets( 44 void MDnsSocketFactoryImpl::CreateSockets(
45 ScopedVector<DatagramServerSocket>* sockets) { 45 ScopedVector<DatagramServerSocket>* sockets) {
46 InterfaceIndexFamilyList interfaces(GetMDnsInterfacesToBind()); 46 InterfaceIndexFamilyList interfaces(GetMDnsInterfacesToBind());
47 for (size_t i = 0; i < interfaces.size(); ++i) { 47 for (size_t i = 0; i < interfaces.size(); ++i) {
48 DCHECK(interfaces[i].second == ADDRESS_FAMILY_IPV4 || 48 DCHECK(interfaces[i].second == ADDRESS_FAMILY_IPV4 ||
49 interfaces[i].second == ADDRESS_FAMILY_IPV6); 49 interfaces[i].second == ADDRESS_FAMILY_IPV6);
50 scoped_ptr<DatagramServerSocket> socket( 50 scoped_ptr<DatagramServerSocket> socket(
51 CreateAndBindMDnsSocket(interfaces[i].second, interfaces[i].first)); 51 CreateAndBindMDnsSocket(interfaces[i].second, interfaces[i].first));
52 if (socket) 52 if (socket)
53 sockets->push_back(socket.release()); 53 sockets->push_back(socket.Pass());
54 } 54 }
55 } 55 }
56 56
57 MDnsConnection::SocketHandler::SocketHandler( 57 MDnsConnection::SocketHandler::SocketHandler(
58 scoped_ptr<DatagramServerSocket> socket, 58 scoped_ptr<DatagramServerSocket> socket,
59 MDnsConnection* connection) 59 MDnsConnection* connection)
60 : socket_(socket.Pass()), 60 : socket_(socket.Pass()),
61 connection_(connection), 61 connection_(connection),
62 response_(dns_protocol::kMaxMulticastSize), 62 response_(dns_protocol::kMaxMulticastSize),
63 send_in_progress_(false) { 63 send_in_progress_(false) {
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 738
739 void MDnsTransactionImpl::OnNsecRecord(const std::string& name, unsigned type) { 739 void MDnsTransactionImpl::OnNsecRecord(const std::string& name, unsigned type) {
740 TriggerCallback(RESULT_NSEC, NULL); 740 TriggerCallback(RESULT_NSEC, NULL);
741 } 741 }
742 742
743 void MDnsTransactionImpl::OnCachePurged() { 743 void MDnsTransactionImpl::OnCachePurged() {
744 // TODO(noamsml): Cache purge situations not yet implemented 744 // TODO(noamsml): Cache purge situations not yet implemented
745 } 745 }
746 746
747 } // namespace net 747 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/host_resolver_mojo_unittest.cc ('k') | net/dns/mock_mdns_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698