Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: net/base/dnsrr_resolver.cc

Issue 7008021: Added DnsQuery class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
102 // kMaxCacheEntries is the number of RRResponse objects that we'll cache. 101 // kMaxCacheEntries is the number of RRResponse objects that we'll cache.
103 static const unsigned kMaxCacheEntries = 32; 102 static const unsigned kMaxCacheEntries = 32;
104 // kNegativeTTLSecs is the number of seconds for which we'll cache a negative 103 // kNegativeTTLSecs is the number of seconds for which we'll cache a negative
105 // cache entry. 104 // cache entry.
106 static const unsigned kNegativeTTLSecs = 60; 105 static const unsigned kNegativeTTLSecs = 60;
107 106
108 RRResponse::RRResponse() 107 RRResponse::RRResponse()
109 : ttl(0), dnssec(false), negative(false) { 108 : ttl(0), dnssec(false), negative(false) {
110 } 109 }
111 110
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 inflight_.erase(j); 673 inflight_.erase(j);
675 674
676 job->HandleResult(result, response); 675 job->HandleResult(result, response);
677 delete job; 676 delete job;
678 } 677 }
679 678
680 } // namespace net 679 } // namespace net
681 680
682 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle); 681 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle);
683 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker); 682 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker);
OLDNEW
« net/base/dns_query_unittest.cc ('K') | « net/base/dns_util.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698