| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. |
| 3 * All rights reserved. |
| 3 * | 4 * |
| 4 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 6 * are met: | 7 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 11 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 12 * | 13 * |
| (...skipping 13 matching lines...) Expand all Loading... |
| 26 #ifndef KnownPorts_h | 27 #ifndef KnownPorts_h |
| 27 #define KnownPorts_h | 28 #define KnownPorts_h |
| 28 | 29 |
| 29 #include "platform/PlatformExport.h" | 30 #include "platform/PlatformExport.h" |
| 30 #include "wtf/text/WTFString.h" | 31 #include "wtf/text/WTFString.h" |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 | 34 |
| 34 class KURL; | 35 class KURL; |
| 35 | 36 |
| 36 // Returns true if |port| is known to be the default for |protocol|. |protocol|
must be lower case. | 37 // Returns true if |port| is known to be the default for |protocol|. |protocol| |
| 38 // must be lower case. |
| 37 PLATFORM_EXPORT bool isDefaultPortForProtocol(unsigned short port, | 39 PLATFORM_EXPORT bool isDefaultPortForProtocol(unsigned short port, |
| 38 const WTF::String& protocol); | 40 const WTF::String& protocol); |
| 39 | 41 |
| 40 // Returns 0 for unknown protocols. |protocol| must be lower case. | 42 // Returns 0 for unknown protocols. |protocol| must be lower case. |
| 41 PLATFORM_EXPORT unsigned short defaultPortForProtocol( | 43 PLATFORM_EXPORT unsigned short defaultPortForProtocol( |
| 42 const WTF::String& protocol); | 44 const WTF::String& protocol); |
| 43 | 45 |
| 44 // Returns true if the port of the |url| is allowed for the scheme of the |url|. | 46 // Returns true if the port of the |url| is allowed for the scheme of the |url|. |
| 45 PLATFORM_EXPORT bool isPortAllowedForScheme(const KURL&); | 47 PLATFORM_EXPORT bool isPortAllowedForScheme(const KURL&); |
| 46 | 48 |
| 47 } // namespace blink | 49 } // namespace blink |
| 48 | 50 |
| 49 #endif // KnownPorts_h | 51 #endif // KnownPorts_h |
| OLD | NEW |