| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/ip_address_number.h" | 5 #include "net/base/ip_address_number.h" |
| 6 | 6 |
| 7 #include <limits.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
| 10 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 12 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 13 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 14 #include "url/url_canon_ip.h" | 16 #include "url/url_canon_ip.h" |
| 15 | 17 |
| 16 namespace net { | 18 namespace net { |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 290 } |
| 289 return a1.size() * CHAR_BIT; | 291 return a1.size() * CHAR_BIT; |
| 290 } | 292 } |
| 291 | 293 |
| 292 unsigned MaskPrefixLength(const IPAddressNumber& mask) { | 294 unsigned MaskPrefixLength(const IPAddressNumber& mask) { |
| 293 IPAddressNumber all_ones(mask.size(), 0xFF); | 295 IPAddressNumber all_ones(mask.size(), 0xFF); |
| 294 return CommonPrefixLength(mask, all_ones); | 296 return CommonPrefixLength(mask, all_ones); |
| 295 } | 297 } |
| 296 | 298 |
| 297 } // namespace net | 299 } // namespace net |
| OLD | NEW |