| 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_rdata.h" | 5 #include "net/dns/record_rdata.h" |
| 6 | 6 |
| 7 #include "base/big_endian.h" | 7 #include "base/big_endian.h" |
| 8 #include "net/base/ip_address_number.h" | |
| 9 #include "net/dns/dns_protocol.h" | 8 #include "net/dns/dns_protocol.h" |
| 10 #include "net/dns/dns_response.h" | 9 #include "net/dns/dns_response.h" |
| 11 | 10 |
| 12 namespace net { | 11 namespace net { |
| 13 | 12 |
| 14 static const size_t kSrvRecordMinimumSize = 6; | 13 static const size_t kSrvRecordMinimumSize = 6; |
| 15 | 14 |
| 16 RecordRdata::RecordRdata() { | 15 RecordRdata::RecordRdata() { |
| 17 } | 16 } |
| 18 | 17 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 bool NsecRecordRdata::GetBit(unsigned i) const { | 270 bool NsecRecordRdata::GetBit(unsigned i) const { |
| 272 unsigned byte_num = i/8; | 271 unsigned byte_num = i/8; |
| 273 if (bitmap_.size() < byte_num + 1) | 272 if (bitmap_.size() < byte_num + 1) |
| 274 return false; | 273 return false; |
| 275 | 274 |
| 276 unsigned bit_num = 7 - i % 8; | 275 unsigned bit_num = 7 - i % 8; |
| 277 return (bitmap_[byte_num] & (1 << bit_num)) != 0; | 276 return (bitmap_[byte_num] & (1 << bit_num)) != 0; |
| 278 } | 277 } |
| 279 | 278 |
| 280 } // namespace net | 279 } // namespace net |
| OLD | NEW |