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

Side by Side Diff: net/dns/host_resolver_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, 6 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_transaction_unittest.cc ('k') | net/dns/host_resolver_mojo_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 (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/host_resolver_impl.h" 5 #include "net/dns/host_resolver_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 req->source_net_log().source(), 1329 req->source_net_log().source(),
1330 priority())); 1330 priority()));
1331 1331
1332 // TODO(szym): Check if this is still needed. 1332 // TODO(szym): Check if this is still needed.
1333 if (!req->info().is_speculative()) { 1333 if (!req->info().is_speculative()) {
1334 had_non_speculative_request_ = true; 1334 had_non_speculative_request_ = true;
1335 if (proc_task_.get()) 1335 if (proc_task_.get())
1336 proc_task_->set_had_non_speculative_request(); 1336 proc_task_->set_had_non_speculative_request();
1337 } 1337 }
1338 1338
1339 requests_.push_back(req.release()); 1339 requests_.push_back(req.Pass());
1340 1340
1341 UpdatePriority(); 1341 UpdatePriority();
1342 } 1342 }
1343 1343
1344 // Marks |req| as cancelled. If it was the last active Request, also finishes 1344 // Marks |req| as cancelled. If it was the last active Request, also finishes
1345 // this Job, marking it as cancelled, and deletes it. 1345 // this Job, marking it as cancelled, and deletes it.
1346 void CancelRequest(Request* req) { 1346 void CancelRequest(Request* req) {
1347 DCHECK_EQ(key_.hostname, req->info().hostname()); 1347 DCHECK_EQ(key_.hostname, req->info().hostname());
1348 DCHECK(!req->was_canceled()); 1348 DCHECK(!req->was_canceled());
1349 1349
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 dns_client_->SetConfig(dns_config); 2424 dns_client_->SetConfig(dns_config);
2425 num_dns_failures_ = 0; 2425 num_dns_failures_ = 0;
2426 if (dns_client_->GetConfig()) 2426 if (dns_client_->GetConfig())
2427 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); 2427 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true);
2428 } 2428 }
2429 2429
2430 AbortDnsTasks(); 2430 AbortDnsTasks();
2431 } 2431 }
2432 2432
2433 } // namespace net 2433 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_transaction_unittest.cc ('k') | net/dns/host_resolver_mojo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698