Chromium Code Reviews| 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/base/host_resolver_impl.h" | 5 #include "net/base/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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1348 | 1348 |
| 1349 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB, | 1349 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB, |
| 1350 net_error); | 1350 net_error); |
| 1351 | 1351 |
| 1352 DCHECK(!requests_.empty()); | 1352 DCHECK(!requests_.empty()); |
| 1353 | 1353 |
| 1354 if (net_error == OK) { | 1354 if (net_error == OK) { |
| 1355 SetPortOnAddressList(requests_->front()->info().port(), &list); | 1355 SetPortOnAddressList(requests_->front()->info().port(), &list); |
| 1356 // Record this histogram here, when we know the system has a valid DNS | 1356 // Record this histogram here, when we know the system has a valid DNS |
| 1357 // configuration. | 1357 // configuration. |
| 1358 UMA_HISTOGRAM_ENUMERATION("AsyncDNS.HaveDnsConfig", | 1358 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.HaveDnsConfig", |
|
cbentzel
2012/06/15 20:29:36
Does this require any changes for the dashboards?
szym
2012/06/15 21:22:19
From my understanding of histogram.{h,cc} this has
| |
| 1359 resolver_->received_dns_config_ ? 1 : 0, | 1359 resolver_->received_dns_config_); |
| 1360 2); | |
| 1361 } | 1360 } |
| 1362 | 1361 |
| 1363 if ((net_error != ERR_ABORTED) && | 1362 if ((net_error != ERR_ABORTED) && |
| 1364 (net_error != ERR_HOST_RESOLVER_QUEUE_TOO_LARGE)) { | 1363 (net_error != ERR_HOST_RESOLVER_QUEUE_TOO_LARGE)) { |
| 1365 resolver_->CacheResult(key_, net_error, list, ttl); | 1364 resolver_->CacheResult(key_, net_error, list, ttl); |
| 1366 } | 1365 } |
| 1367 | 1366 |
| 1368 // Complete all of the requests that were attached to the job. | 1367 // Complete all of the requests that were attached to the job. |
| 1369 for (RequestsList::const_iterator it = requests_.begin(); | 1368 for (RequestsList::const_iterator it = requests_.begin(); |
| 1370 it != requests_.end(); ++it) { | 1369 it != requests_.end(); ++it) { |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1902 if (self) | 1901 if (self) |
| 1903 TryServingAllJobsFromHosts(); | 1902 TryServingAllJobsFromHosts(); |
| 1904 } | 1903 } |
| 1905 } | 1904 } |
| 1906 | 1905 |
| 1907 bool HostResolverImpl::HaveDnsConfig() const { | 1906 bool HostResolverImpl::HaveDnsConfig() const { |
| 1908 return (dns_client_.get() != NULL) && (dns_client_->GetConfig() != NULL); | 1907 return (dns_client_.get() != NULL) && (dns_client_->GetConfig() != NULL); |
| 1909 } | 1908 } |
| 1910 | 1909 |
| 1911 } // namespace net | 1910 } // namespace net |
| OLD | NEW |