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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/dns_session_unittest.cc ('k') | net/dns/dns_transaction.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/dns_socket_pool.h" 5 #include "net/dns/dns_socket_pool.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (socket.get()) { 80 if (socket.get()) {
81 int rv = socket->Connect((*nameservers_)[server_index]); 81 int rv = socket->Connect((*nameservers_)[server_index]);
82 if (rv != OK) { 82 if (rv != OK) {
83 VLOG(1) << "Failed to connect socket: " << rv; 83 VLOG(1) << "Failed to connect socket: " << rv;
84 socket.reset(); 84 socket.reset();
85 } 85 }
86 } else { 86 } else {
87 LOG(WARNING) << "Failed to create socket."; 87 LOG(WARNING) << "Failed to create socket.";
88 } 88 }
89 89
90 return socket.Pass(); 90 return socket;
91 } 91 }
92 92
93 class NullDnsSocketPool : public DnsSocketPool { 93 class NullDnsSocketPool : public DnsSocketPool {
94 public: 94 public:
95 NullDnsSocketPool(ClientSocketFactory* factory) 95 NullDnsSocketPool(ClientSocketFactory* factory)
96 : DnsSocketPool(factory) { 96 : DnsSocketPool(factory) {
97 } 97 }
98 98
99 void Initialize(const std::vector<IPEndPoint>* nameservers, 99 void Initialize(const std::vector<IPEndPoint>* nameservers,
100 NetLog* net_log) override { 100 NetLog* net_log) override {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 for (unsigned pool_index = pool.size(); pool_index < size; ++pool_index) { 209 for (unsigned pool_index = pool.size(); pool_index < size; ++pool_index) {
210 DatagramClientSocket* socket = 210 DatagramClientSocket* socket =
211 CreateConnectedSocket(server_index).release(); 211 CreateConnectedSocket(server_index).release();
212 if (!socket) 212 if (!socket)
213 break; 213 break;
214 pool.push_back(socket); 214 pool.push_back(socket);
215 } 215 }
216 } 216 }
217 217
218 } // namespace net 218 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_session_unittest.cc ('k') | net/dns/dns_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698