| 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 |
| 267 // Checks the effective port of the |url| against a list of ports which are |
| 268 // restricted by the scheme of the |url|. Returns true if the port is allowed, |
| 269 // false if it is restricted. |
| 270 NET_EXPORT_PRIVATE bool IsEffectivePortAllowedByScheme(const GURL& url); |
| 271 |
| 263 // Check if banned |port| has been overriden by an entry in | 272 // Check if banned |port| has been overriden by an entry in |
| 264 // |explicitly_allowed_ports_|. | 273 // |explicitly_allowed_ports_|. |
| 265 NET_EXPORT_PRIVATE bool IsPortAllowedByOverride(int port); | 274 NET_EXPORT_PRIVATE bool IsPortAllowedByOverride(int port); |
| 266 | 275 |
| 267 // Set socket to non-blocking mode | 276 // Set socket to non-blocking mode |
| 268 NET_EXPORT int SetNonBlocking(int fd); | 277 NET_EXPORT int SetNonBlocking(int fd); |
| 269 | 278 |
| 270 // Formats the host in |url| and appends it to |output|. The host formatter | 279 // Formats the host in |url| and appends it to |output|. The host formatter |
| 271 // takes the same accept languages component as ElideURL(). | 280 // takes the same accept languages component as ElideURL(). |
| 272 NET_EXPORT void AppendFormattedHost(const GURL& url, | 281 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 | 582 DSCP_CS5 = 40, // Video |
| 574 DSCP_EF = 46, // Voice | 583 DSCP_EF = 46, // Voice |
| 575 DSCP_CS6 = 48, // Voice | 584 DSCP_CS6 = 48, // Voice |
| 576 DSCP_CS7 = 56, // Control messages | 585 DSCP_CS7 = 56, // Control messages |
| 577 DSCP_LAST = DSCP_CS7 | 586 DSCP_LAST = DSCP_CS7 |
| 578 }; | 587 }; |
| 579 | 588 |
| 580 } // namespace net | 589 } // namespace net |
| 581 | 590 |
| 582 #endif // NET_BASE_NET_UTIL_H_ | 591 #endif // NET_BASE_NET_UTIL_H_ |
| OLD | NEW |