OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #endif | 75 #endif |
76 UNUSED_PARAM(url); | 76 UNUSED_PARAM(url); |
77 return false; | 77 return false; |
78 } | 78 } |
79 | 79 |
80 // In general, extracting the inner URL varies by scheme. It just so happens | 80 // In general, extracting the inner URL varies by scheme. It just so happens |
81 // that all the URL schemes we currently support that use inner URLs for their | 81 // that all the URL schemes we currently support that use inner URLs for their |
82 // security origin can be parsed using this algorithm. | 82 // security origin can be parsed using this algorithm. |
83 static KURL extractInnerURL(const KURL& url) | 83 static KURL extractInnerURL(const KURL& url) |
84 { | 84 { |
| 85 #if ENABLE(FILE_SYSTEM) |
| 86 if (url.innerURL()) |
| 87 return *url.innerURL(); |
| 88 #endif |
85 // FIXME: Update this callsite to use the innerURL member function when | 89 // FIXME: Update this callsite to use the innerURL member function when |
86 // we finish implementing it. | 90 // we finish implementing it. |
87 return KURL(ParsedURLString, decodeURLEscapeSequences(url.path())); | 91 return KURL(ParsedURLString, decodeURLEscapeSequences(url.path())); |
88 } | 92 } |
89 | 93 |
90 static bool shouldTreatAsUniqueOrigin(const KURL& url) | 94 static bool shouldTreatAsUniqueOrigin(const KURL& url) |
91 { | 95 { |
92 if (!url.isValid()) | 96 if (!url.isValid()) |
93 return true; | 97 return true; |
94 | 98 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 if (m_port != other->m_port) | 505 if (m_port != other->m_port) |
502 return false; | 506 return false; |
503 | 507 |
504 if (isLocal() && !passesFileCheck(other)) | 508 if (isLocal() && !passesFileCheck(other)) |
505 return false; | 509 return false; |
506 | 510 |
507 return true; | 511 return true; |
508 } | 512 } |
509 | 513 |
510 } // namespace WebCore | 514 } // namespace WebCore |
OLD | NEW |