| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 * 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return schemes; | 93 return schemes; |
| 94 } | 94 } |
| 95 | 95 |
| 96 static URLSchemesMap& canDisplayOnlyIfCanRequestSchemes() | 96 static URLSchemesMap& canDisplayOnlyIfCanRequestSchemes() |
| 97 { | 97 { |
| 98 DEFINE_STATIC_LOCAL(URLSchemesMap, canDisplayOnlyIfCanRequestSchemes, ()); | 98 DEFINE_STATIC_LOCAL(URLSchemesMap, canDisplayOnlyIfCanRequestSchemes, ()); |
| 99 | 99 |
| 100 #if ENABLE(BLOB) | 100 #if ENABLE(BLOB) |
| 101 if (canDisplayOnlyIfCanRequestSchemes.isEmpty()) { | 101 if (canDisplayOnlyIfCanRequestSchemes.isEmpty()) { |
| 102 canDisplayOnlyIfCanRequestSchemes.add("blob"); | 102 canDisplayOnlyIfCanRequestSchemes.add("blob"); |
| 103 #if ENABLE(FILE_SYSTEM) | |
| 104 canDisplayOnlyIfCanRequestSchemes.add("filesystem"); | 103 canDisplayOnlyIfCanRequestSchemes.add("filesystem"); |
| 105 #endif | |
| 106 } | 104 } |
| 107 #endif // ENABLE(BLOB) | 105 #endif // ENABLE(BLOB) |
| 108 | 106 |
| 109 return canDisplayOnlyIfCanRequestSchemes; | 107 return canDisplayOnlyIfCanRequestSchemes; |
| 110 } | 108 } |
| 111 | 109 |
| 112 static URLSchemesMap& notAllowingJavascriptURLsSchemes() | 110 static URLSchemesMap& notAllowingJavascriptURLsSchemes() |
| 113 { | 111 { |
| 114 DEFINE_STATIC_LOCAL(URLSchemesMap, notAllowingJavascriptURLsSchemes, ()); | 112 DEFINE_STATIC_LOCAL(URLSchemesMap, notAllowingJavascriptURLsSchemes, ()); |
| 115 return notAllowingJavascriptURLsSchemes; | 113 return notAllowingJavascriptURLsSchemes; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 } | 309 } |
| 312 | 310 |
| 313 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
e) | 311 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
e) |
| 314 { | 312 { |
| 315 if (scheme.isEmpty()) | 313 if (scheme.isEmpty()) |
| 316 return false; | 314 return false; |
| 317 return ContentSecurityPolicyBypassingSchemes().contains(scheme); | 315 return ContentSecurityPolicyBypassingSchemes().contains(scheme); |
| 318 } | 316 } |
| 319 | 317 |
| 320 } // namespace WebCore | 318 } // namespace WebCore |
| OLD | NEW |