| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/dnsrr_resolver.h" | 5 #include "net/base/dnsrr_resolver.h" |
| 6 | 6 |
| 7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
| 8 #include <resolv.h> | 8 #include <resolv.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 case kDNS_DS: | 91 case kDNS_DS: |
| 92 case kDNS_RRSIG: | 92 case kDNS_RRSIG: |
| 93 case kDNS_DNSKEY: | 93 case kDNS_DNSKEY: |
| 94 return true; | 94 return true; |
| 95 default: | 95 default: |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 static const uint16 kClassIN = 1; |
| 101 // kMaxCacheEntries is the number of RRResponse objects that we'll cache. | 102 // kMaxCacheEntries is the number of RRResponse objects that we'll cache. |
| 102 static const unsigned kMaxCacheEntries = 32; | 103 static const unsigned kMaxCacheEntries = 32; |
| 103 // kNegativeTTLSecs is the number of seconds for which we'll cache a negative | 104 // kNegativeTTLSecs is the number of seconds for which we'll cache a negative |
| 104 // cache entry. | 105 // cache entry. |
| 105 static const unsigned kNegativeTTLSecs = 60; | 106 static const unsigned kNegativeTTLSecs = 60; |
| 106 | 107 |
| 107 RRResponse::RRResponse() | 108 RRResponse::RRResponse() |
| 108 : ttl(0), dnssec(false), negative(false) { | 109 : ttl(0), dnssec(false), negative(false) { |
| 109 } | 110 } |
| 110 | 111 |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 inflight_.erase(j); | 674 inflight_.erase(j); |
| 674 | 675 |
| 675 job->HandleResult(result, response); | 676 job->HandleResult(result, response); |
| 676 delete job; | 677 delete job; |
| 677 } | 678 } |
| 678 | 679 |
| 679 } // namespace net | 680 } // namespace net |
| 680 | 681 |
| 681 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle); | 682 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle); |
| 682 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker); | 683 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker); |
| OLD | NEW |