| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/net_util.h" | 5 #include "net/base/net_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <unicode/regex.h> | 9 #include <unicode/regex.h> |
| 10 #include <unicode/ucnv.h> | 10 #include <unicode/ucnv.h> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 2049, // nfs | 140 2049, // nfs |
| 141 3659, // apple-sasl / PasswordServer | 141 3659, // apple-sasl / PasswordServer |
| 142 4045, // lockd | 142 4045, // lockd |
| 143 6000, // X11 | 143 6000, // X11 |
| 144 6665, // Alternate IRC [Apple addition] | 144 6665, // Alternate IRC [Apple addition] |
| 145 6666, // Alternate IRC [Apple addition] | 145 6666, // Alternate IRC [Apple addition] |
| 146 6667, // Standard IRC [Apple addition] | 146 6667, // Standard IRC [Apple addition] |
| 147 6668, // Alternate IRC [Apple addition] | 147 6668, // Alternate IRC [Apple addition] |
| 148 6669, // Alternate IRC [Apple addition] | 148 6669, // Alternate IRC [Apple addition] |
| 149 0xFFFF, // Used to block all invalid port numbers (see | 149 0xFFFF, // Used to block all invalid port numbers (see |
| 150 // third_party/WebKit/WebCore/platform/KURLGoogle.cpp, port()) | 150 // third_party/WebKit/Source/WebCore/platform/KURLGoogle.cpp, port()) |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 // FTP overrides the following restricted ports. | 153 // FTP overrides the following restricted ports. |
| 154 static const int kAllowedFtpPorts[] = { | 154 static const int kAllowedFtpPorts[] = { |
| 155 21, // ftp data | 155 21, // ftp data |
| 156 22, // ssh | 156 22, // ssh |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 template<typename STR> | 159 template<typename STR> |
| 160 STR GetSpecificHeaderT(const STR& headers, const STR& name) { | 160 STR GetSpecificHeaderT(const STR& headers, const STR& name) { |
| (...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 int GetPortFromAddrinfo(const struct addrinfo* info) { | 2062 int GetPortFromAddrinfo(const struct addrinfo* info) { |
| 2063 uint16* port_field = GetPortFieldFromAddrinfo(info); | 2063 uint16* port_field = GetPortFieldFromAddrinfo(info); |
| 2064 if (!port_field) | 2064 if (!port_field) |
| 2065 return -1; | 2065 return -1; |
| 2066 return ntohs(*port_field); | 2066 return ntohs(*port_field); |
| 2067 } | 2067 } |
| 2068 | 2068 |
| 2069 } // namespace net | 2069 } // namespace net |
| OLD | NEW |