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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 net_log_.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_PROC_TASK, | 760 net_log_.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_PROC_TASK, |
761 net_log_callback); | 761 net_log_callback); |
762 | 762 |
763 callback_.Run(error, results_); | 763 callback_.Run(error, results_); |
764 } | 764 } |
765 | 765 |
766 void RecordPerformanceHistograms(const base::TimeTicks& start_time, | 766 void RecordPerformanceHistograms(const base::TimeTicks& start_time, |
767 const int error, | 767 const int error, |
768 const int os_error) const { | 768 const int os_error) const { |
769 DCHECK(origin_loop_->BelongsToCurrentThread()); | 769 DCHECK(origin_loop_->BelongsToCurrentThread()); |
770 enum Category { // Used in HISTOGRAM_ENUMERATION. | 770 enum Category { // Used in UMA_HISTOGRAM_ENUMERATION. |
771 RESOLVE_SUCCESS, | 771 RESOLVE_SUCCESS, |
772 RESOLVE_FAIL, | 772 RESOLVE_FAIL, |
773 RESOLVE_SPECULATIVE_SUCCESS, | 773 RESOLVE_SPECULATIVE_SUCCESS, |
774 RESOLVE_SPECULATIVE_FAIL, | 774 RESOLVE_SPECULATIVE_FAIL, |
775 RESOLVE_MAX, // Bounding value. | 775 RESOLVE_MAX, // Bounding value. |
776 }; | 776 }; |
777 int category = RESOLVE_MAX; // Illegal value for later DCHECK only. | 777 int category = RESOLVE_MAX; // Illegal value for later DCHECK only. |
778 | 778 |
779 base::TimeDelta duration = base::TimeTicks::Now() - start_time; | 779 base::TimeDelta duration = base::TimeTicks::Now() - start_time; |
780 if (error == OK) { | 780 if (error == OK) { |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2359 dns_client_->SetConfig(dns_config); | 2359 dns_client_->SetConfig(dns_config); |
2360 num_dns_failures_ = 0; | 2360 num_dns_failures_ = 0; |
2361 if (dns_client_->GetConfig()) | 2361 if (dns_client_->GetConfig()) |
2362 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); | 2362 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); |
2363 } | 2363 } |
2364 | 2364 |
2365 AbortDnsTasks(); | 2365 AbortDnsTasks(); |
2366 } | 2366 } |
2367 | 2367 |
2368 } // namespace net | 2368 } // namespace net |
OLD | NEW |