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. All r
ights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // These are operations that aren't faster on a parsed URL. | 222 // These are operations that aren't faster on a parsed URL. |
223 // These are also different from the KURL functions in that they don't require t
he string to be a valid and parsable URL. | 223 // These are also different from the KURL functions in that they don't require t
he string to be a valid and parsable URL. |
224 // This is especially important because valid javascript URLs are not necessaril
y considered valid by KURL. | 224 // This is especially important because valid javascript URLs are not necessaril
y considered valid by KURL. |
225 | 225 |
226 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); | 226 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); |
227 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); | 227 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); |
228 | 228 |
229 PLATFORM_EXPORT bool isValidProtocol(const String&); | 229 PLATFORM_EXPORT bool isValidProtocol(const String&); |
230 | 230 |
231 // Unescapes the given string using URL escaping rules, given an optional | 231 // Unescapes the given string using URL escaping rules, given an optional |
232 // encoding (defaulting to UTF-8 otherwise). DANGER: If the URL has "%00" | 232 // encoding (defaulting to UTF-8 otherwise). |
233 // in it, the resulting string will have embedded null characters! | 233 // |
| 234 // DANGER: If the URL has "%00" in it, the resulting string will have embedded |
| 235 // null characters! |
| 236 // |
| 237 // This function is also used to decode javascript: URLs and as a general |
| 238 // purpose unescaping function. |
234 PLATFORM_EXPORT String decodeURLEscapeSequences(const String&); | 239 PLATFORM_EXPORT String decodeURLEscapeSequences(const String&); |
235 PLATFORM_EXPORT String decodeURLEscapeSequences(const String&, const WTF::TextEn
coding&); | 240 PLATFORM_EXPORT String decodeURLEscapeSequences(const String&, const WTF::TextEn
coding&); |
236 | 241 |
237 PLATFORM_EXPORT String encodeWithURLEscapeSequences(const String&); | 242 PLATFORM_EXPORT String encodeWithURLEscapeSequences(const String&); |
238 | 243 |
239 // Inlines. | 244 // Inlines. |
240 | 245 |
241 inline bool operator==(const KURL& a, const KURL& b) | 246 inline bool operator==(const KURL& a, const KURL& b) |
242 { | 247 { |
243 return a.getString() == b.getString(); | 248 return a.getString() == b.getString(); |
(...skipping 29 matching lines...) Expand all Loading... |
273 namespace WTF { | 278 namespace WTF { |
274 | 279 |
275 // KURLHash is the default hash for String | 280 // KURLHash is the default hash for String |
276 template<> struct DefaultHash<blink::KURL> { | 281 template<> struct DefaultHash<blink::KURL> { |
277 typedef blink::KURLHash Hash; | 282 typedef blink::KURLHash Hash; |
278 }; | 283 }; |
279 | 284 |
280 } // namespace WTF | 285 } // namespace WTF |
281 | 286 |
282 #endif // KURL_h | 287 #endif // KURL_h |
OLD | NEW |