OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/record_parsed.h" | 5 #include "net/dns/record_parsed.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/dns/dns_response.h" | 8 #include "net/dns/dns_response.h" |
9 #include "net/dns/record_rdata.h" | 9 #include "net/dns/record_rdata.h" |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 case SrvRecordRdata::kType: | 46 case SrvRecordRdata::kType: |
47 rdata = SrvRecordRdata::Create(record.rdata, *parser); | 47 rdata = SrvRecordRdata::Create(record.rdata, *parser); |
48 break; | 48 break; |
49 case TxtRecordRdata::kType: | 49 case TxtRecordRdata::kType: |
50 rdata = TxtRecordRdata::Create(record.rdata, *parser); | 50 rdata = TxtRecordRdata::Create(record.rdata, *parser); |
51 break; | 51 break; |
52 case NsecRecordRdata::kType: | 52 case NsecRecordRdata::kType: |
53 rdata = NsecRecordRdata::Create(record.rdata, *parser); | 53 rdata = NsecRecordRdata::Create(record.rdata, *parser); |
54 break; | 54 break; |
55 default: | 55 default: |
56 DVLOG(1) << "Unknown RData type for recieved record: " << record.type; | 56 DVLOG(1) << "Unknown RData type for received record: " << record.type; |
57 return scoped_ptr<const RecordParsed>(); | 57 return scoped_ptr<const RecordParsed>(); |
58 } | 58 } |
59 | 59 |
60 if (!rdata.get()) | 60 if (!rdata.get()) |
61 return scoped_ptr<const RecordParsed>(); | 61 return scoped_ptr<const RecordParsed>(); |
62 | 62 |
63 return scoped_ptr<const RecordParsed>(new RecordParsed(record.name, | 63 return scoped_ptr<const RecordParsed>(new RecordParsed(record.name, |
64 record.type, | 64 record.type, |
65 record.klass, | 65 record.klass, |
66 record.ttl, | 66 record.ttl, |
(...skipping 10 matching lines...) Expand all Loading... |
77 klass &= dns_protocol::kMDnsClassMask; | 77 klass &= dns_protocol::kMDnsClassMask; |
78 other_klass &= dns_protocol::kMDnsClassMask; | 78 other_klass &= dns_protocol::kMDnsClassMask; |
79 } | 79 } |
80 | 80 |
81 return name_ == other->name_ && | 81 return name_ == other->name_ && |
82 klass == other_klass && | 82 klass == other_klass && |
83 type_ == other->type_ && | 83 type_ == other->type_ && |
84 rdata_->IsEqual(other->rdata_.get()); | 84 rdata_->IsEqual(other->rdata_.get()); |
85 } | 85 } |
86 } | 86 } |
OLD | NEW |