| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 break; | 42 break; |
| 43 case PtrRecordRdata::kType: | 43 case PtrRecordRdata::kType: |
| 44 rdata = PtrRecordRdata::Create(record.rdata, *parser); | 44 rdata = PtrRecordRdata::Create(record.rdata, *parser); |
| 45 break; | 45 break; |
| 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: |
| 53 rdata = NsecRecordRdata::Create(record.rdata, *parser); |
| 54 break; |
| 52 default: | 55 default: |
| 53 LOG(WARNING) << "Unknown RData type for recieved record: " << record.type; | 56 LOG(WARNING) << "Unknown RData type for recieved record: " << record.type; |
| 54 return scoped_ptr<const RecordParsed>(); | 57 return scoped_ptr<const RecordParsed>(); |
| 55 } | 58 } |
| 56 | 59 |
| 57 if (!rdata.get()) | 60 if (!rdata.get()) |
| 58 return scoped_ptr<const RecordParsed>(); | 61 return scoped_ptr<const RecordParsed>(); |
| 59 | 62 |
| 60 return scoped_ptr<const RecordParsed>(new RecordParsed(record.name, | 63 return scoped_ptr<const RecordParsed>(new RecordParsed(record.name, |
| 61 record.type, | 64 record.type, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 74 klass &= dns_protocol::kMDnsClassMask; | 77 klass &= dns_protocol::kMDnsClassMask; |
| 75 other_klass &= dns_protocol::kMDnsClassMask; | 78 other_klass &= dns_protocol::kMDnsClassMask; |
| 76 } | 79 } |
| 77 | 80 |
| 78 return name_ == other->name_ && | 81 return name_ == other->name_ && |
| 79 klass == other_klass && | 82 klass == other_klass && |
| 80 type_ == other->type_ && | 83 type_ == other->type_ && |
| 81 rdata_->IsEqual(other->rdata_.get()); | 84 rdata_->IsEqual(other->rdata_.get()); |
| 82 } | 85 } |
| 83 } | 86 } |
| OLD | NEW |