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

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

Issue 1932363003: Remove net::IPAddressNumber. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « net/dns/dns_test_util.cc ('k') | net/net.gypi » ('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/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
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
OLDNEW
« no previous file with comments | « net/dns/dns_test_util.cc ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698