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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 &addr_list)) { | 1410 &addr_list)) { |
1411 // This will destroy the Job. | 1411 // This will destroy the Job. |
1412 CompleteRequests( | 1412 CompleteRequests( |
1413 HostCache::Entry(OK, MakeAddressListForRequest(addr_list)), | 1413 HostCache::Entry(OK, MakeAddressListForRequest(addr_list)), |
1414 base::TimeDelta()); | 1414 base::TimeDelta()); |
1415 return true; | 1415 return true; |
1416 } | 1416 } |
1417 return false; | 1417 return false; |
1418 } | 1418 } |
1419 | 1419 |
1420 const Key key() const { | 1420 const Key& key() const { return key_; } |
1421 return key_; | |
1422 } | |
1423 | 1421 |
1424 bool is_queued() const { | 1422 bool is_queued() const { |
1425 return !handle_.is_null(); | 1423 return !handle_.is_null(); |
1426 } | 1424 } |
1427 | 1425 |
1428 bool is_running() const { | 1426 bool is_running() const { |
1429 return is_dns_running() || is_proc_running(); | 1427 return is_dns_running() || is_proc_running(); |
1430 } | 1428 } |
1431 | 1429 |
1432 private: | 1430 private: |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2433 dns_client_->SetConfig(dns_config); | 2431 dns_client_->SetConfig(dns_config); |
2434 num_dns_failures_ = 0; | 2432 num_dns_failures_ = 0; |
2435 if (dns_client_->GetConfig()) | 2433 if (dns_client_->GetConfig()) |
2436 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); | 2434 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); |
2437 } | 2435 } |
2438 | 2436 |
2439 AbortDnsTasks(); | 2437 AbortDnsTasks(); |
2440 } | 2438 } |
2441 | 2439 |
2442 } // namespace net | 2440 } // namespace net |
OLD | NEW |