OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "url/url_canon_ip.h" | 5 #include "url/url_canon_ip.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "url/third_party/mozilla/url_parse.h" |
12 #include "url/url_canon_internal.h" | 13 #include "url/url_canon_internal.h" |
13 | 14 |
14 namespace url { | 15 namespace url { |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 // Converts one of the character types that represent a numerical base to the | 19 // Converts one of the character types that represent a numerical base to the |
19 // corresponding base. | 20 // corresponding base. |
20 int BaseForType(SharedCharTypes type) { | 21 int BaseForType(SharedCharTypes type) { |
21 switch (type) { | 22 switch (type) { |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 return DoIPv6AddressToNumber<char, unsigned char>(spec, host, address); | 703 return DoIPv6AddressToNumber<char, unsigned char>(spec, host, address); |
703 } | 704 } |
704 | 705 |
705 bool IPv6AddressToNumber(const base::char16* spec, | 706 bool IPv6AddressToNumber(const base::char16* spec, |
706 const Component& host, | 707 const Component& host, |
707 unsigned char address[16]) { | 708 unsigned char address[16]) { |
708 return DoIPv6AddressToNumber<base::char16, base::char16>(spec, host, address); | 709 return DoIPv6AddressToNumber<base::char16, base::char16>(spec, host, address); |
709 } | 710 } |
710 | 711 |
711 } // namespace url | 712 } // namespace url |
OLD | NEW |