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 #ifndef NET_BASE_NET_UTIL_H_ | 5 #ifndef NET_BASE_NET_UTIL_H_ |
6 #define NET_BASE_NET_UTIL_H_ | 6 #define NET_BASE_NET_UTIL_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 NET_EXPORT bool IsPortValid(int port); | 253 NET_EXPORT bool IsPortValid(int port); |
254 | 254 |
255 // Checks |port| against a list of ports which are restricted by default. | 255 // Checks |port| against a list of ports which are restricted by default. |
256 // Returns true if |port| is allowed, false if it is restricted. | 256 // Returns true if |port| is allowed, false if it is restricted. |
257 NET_EXPORT bool IsPortAllowedByDefault(int port); | 257 NET_EXPORT bool IsPortAllowedByDefault(int port); |
258 | 258 |
259 // Checks |port| against a list of ports which are restricted by the FTP | 259 // Checks |port| against a list of ports which are restricted by the FTP |
260 // protocol. Returns true if |port| is allowed, false if it is restricted. | 260 // protocol. Returns true if |port| is allowed, false if it is restricted. |
261 NET_EXPORT_PRIVATE bool IsPortAllowedByFtp(int port); | 261 NET_EXPORT_PRIVATE bool IsPortAllowedByFtp(int port); |
262 | 262 |
| 263 // Checks |port| against a list of ports which are restricted by the HTTPS/WSS |
| 264 // protocols. Returns true if |port| is allowed, false if it is restricted. |
| 265 NET_EXPORT_PRIVATE bool IsPortAllowedByHttpsOrWss(int port); |
| 266 |
263 // Check if banned |port| has been overriden by an entry in | 267 // Check if banned |port| has been overriden by an entry in |
264 // |explicitly_allowed_ports_|. | 268 // |explicitly_allowed_ports_|. |
265 NET_EXPORT_PRIVATE bool IsPortAllowedByOverride(int port); | 269 NET_EXPORT_PRIVATE bool IsPortAllowedByOverride(int port); |
266 | 270 |
267 // Set socket to non-blocking mode | 271 // Set socket to non-blocking mode |
268 NET_EXPORT int SetNonBlocking(int fd); | 272 NET_EXPORT int SetNonBlocking(int fd); |
269 | 273 |
270 // Formats the host in |url| and appends it to |output|. The host formatter | 274 // Formats the host in |url| and appends it to |output|. The host formatter |
271 // takes the same accept languages component as ElideURL(). | 275 // takes the same accept languages component as ElideURL(). |
272 NET_EXPORT void AppendFormattedHost(const GURL& url, | 276 NET_EXPORT void AppendFormattedHost(const GURL& url, |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 DSCP_CS5 = 40, // Video | 577 DSCP_CS5 = 40, // Video |
574 DSCP_EF = 46, // Voice | 578 DSCP_EF = 46, // Voice |
575 DSCP_CS6 = 48, // Voice | 579 DSCP_CS6 = 48, // Voice |
576 DSCP_CS7 = 56, // Control messages | 580 DSCP_CS7 = 56, // Control messages |
577 DSCP_LAST = DSCP_CS7 | 581 DSCP_LAST = DSCP_CS7 |
578 }; | 582 }; |
579 | 583 |
580 } // namespace net | 584 } // namespace net |
581 | 585 |
582 #endif // NET_BASE_NET_UTIL_H_ | 586 #endif // NET_BASE_NET_UTIL_H_ |
OLD | NEW |