OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |