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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1354 DNS_HISTOGRAM_BY_PRIORITY("AsyncDNS.JobQueueTime", priority(), | 1354 DNS_HISTOGRAM_BY_PRIORITY("AsyncDNS.JobQueueTime", priority(), |
1355 queue_time); | 1355 queue_time); |
1356 DNS_HISTOGRAM_BY_PRIORITY("AsyncDNS.JobQueueTimeAfterChange", priority(), | 1356 DNS_HISTOGRAM_BY_PRIORITY("AsyncDNS.JobQueueTimeAfterChange", priority(), |
1357 queue_time_after_change); | 1357 queue_time_after_change); |
1358 } else { | 1358 } else { |
1359 DNS_HISTOGRAM_BY_PRIORITY("DNS.JobQueueTime", priority(), queue_time); | 1359 DNS_HISTOGRAM_BY_PRIORITY("DNS.JobQueueTime", priority(), queue_time); |
1360 DNS_HISTOGRAM_BY_PRIORITY("DNS.JobQueueTimeAfterChange", priority(), | 1360 DNS_HISTOGRAM_BY_PRIORITY("DNS.JobQueueTimeAfterChange", priority(), |
1361 queue_time_after_change); | 1361 queue_time_after_change); |
1362 } | 1362 } |
1363 | 1363 |
1364 bool native_only = key_.host_resolver_flags & HOST_RESOLVER_SYSTEM_ONLY; | |
szym
2013/09/16 22:15:54
|system_only|
Elly Fong-Jones
2013/09/17 19:20:23
Done.
| |
1365 | |
1364 // Caution: Job::Start must not complete synchronously. | 1366 // Caution: Job::Start must not complete synchronously. |
1365 if (had_dns_config_ && !ResemblesMulticastDNSName(key_.hostname)) { | 1367 if (!native_only && had_dns_config_ && |
1368 !ResemblesMulticastDNSName(key_.hostname)) { | |
1366 StartDnsTask(); | 1369 StartDnsTask(); |
1367 } else { | 1370 } else { |
1368 StartProcTask(); | 1371 StartProcTask(); |
1369 } | 1372 } |
1370 } | 1373 } |
1371 | 1374 |
1372 // TODO(szym): Since DnsTransaction does not consume threads, we can increase | 1375 // TODO(szym): Since DnsTransaction does not consume threads, we can increase |
1373 // the limits on |dispatcher_|. But in order to keep the number of WorkerPool | 1376 // the limits on |dispatcher_|. But in order to keep the number of WorkerPool |
1374 // threads low, we will need to use an "inner" PrioritizedDispatcher with | 1377 // threads low, we will need to use an "inner" PrioritizedDispatcher with |
1375 // tighter limits. | 1378 // tighter limits. |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2197 } | 2200 } |
2198 DnsConfig dns_config; | 2201 DnsConfig dns_config; |
2199 NetworkChangeNotifier::GetDnsConfig(&dns_config); | 2202 NetworkChangeNotifier::GetDnsConfig(&dns_config); |
2200 dns_client_->SetConfig(dns_config); | 2203 dns_client_->SetConfig(dns_config); |
2201 num_dns_failures_ = 0; | 2204 num_dns_failures_ = 0; |
2202 if (dns_client_->GetConfig()) | 2205 if (dns_client_->GetConfig()) |
2203 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); | 2206 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); |
2204 } | 2207 } |
2205 | 2208 |
2206 } // namespace net | 2209 } // namespace net |
OLD | NEW |