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

Side by Side Diff: net/dns/record_rdata.cc

Issue 1162973005: Stop including ip_address_number.h from net_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove some header sorting changes, seems to be breaking windows Created 5 years, 6 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
« no previous file with comments | « net/dns/dns_hosts.h ('k') | net/dns/record_rdata_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/dns_util.h" 8 #include "net/base/dns_util.h"
9 #include "net/base/ip_address_number.h"
9 #include "net/dns/dns_protocol.h" 10 #include "net/dns/dns_protocol.h"
10 #include "net/dns/dns_response.h" 11 #include "net/dns/dns_response.h"
11 12
12 namespace net { 13 namespace net {
13 14
14 static const size_t kSrvRecordMinimumSize = 6; 15 static const size_t kSrvRecordMinimumSize = 6;
15 16
16 RecordRdata::RecordRdata() { 17 RecordRdata::RecordRdata() {
17 } 18 }
18 19
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 bool NsecRecordRdata::GetBit(unsigned i) const { 279 bool NsecRecordRdata::GetBit(unsigned i) const {
279 unsigned byte_num = i/8; 280 unsigned byte_num = i/8;
280 if (bitmap_.size() < byte_num + 1) 281 if (bitmap_.size() < byte_num + 1)
281 return false; 282 return false;
282 283
283 unsigned bit_num = 7 - i % 8; 284 unsigned bit_num = 7 - i % 8;
284 return (bitmap_[byte_num] & (1 << bit_num)) != 0; 285 return (bitmap_[byte_num] & (1 << bit_num)) != 0;
285 } 286 }
286 287
287 } // namespace net 288 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_hosts.h ('k') | net/dns/record_rdata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698