| 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 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "platform/weborigin/SchemeRegistry.h" | 28 #include "platform/weborigin/SchemeRegistry.h" |
| 29 | 29 |
| 30 #include "wtf/MainThread.h" | 30 #include "wtf/MainThread.h" |
| 31 #include "wtf/text/StringBuilder.h" | 31 #include "wtf/text/StringBuilder.h" |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace blink { |
| 34 | 34 |
| 35 static URLSchemesMap& localURLSchemes() | 35 static URLSchemesMap& localURLSchemes() |
| 36 { | 36 { |
| 37 DEFINE_STATIC_LOCAL(URLSchemesMap, localSchemes, ()); | 37 DEFINE_STATIC_LOCAL(URLSchemesMap, localSchemes, ()); |
| 38 | 38 |
| 39 if (localSchemes.isEmpty()) | 39 if (localSchemes.isEmpty()) |
| 40 localSchemes.add("file"); | 40 localSchemes.add("file"); |
| 41 | 41 |
| 42 return localSchemes; | 42 return localSchemes; |
| 43 } | 43 } |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 ContentSecurityPolicyBypassingSchemes().remove(scheme); | 284 ContentSecurityPolicyBypassingSchemes().remove(scheme); |
| 285 } | 285 } |
| 286 | 286 |
| 287 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
e) | 287 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
e) |
| 288 { | 288 { |
| 289 if (scheme.isEmpty()) | 289 if (scheme.isEmpty()) |
| 290 return false; | 290 return false; |
| 291 return ContentSecurityPolicyBypassingSchemes().contains(scheme); | 291 return ContentSecurityPolicyBypassingSchemes().contains(scheme); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace WebCore | 294 } // namespace blink |
| OLD | NEW |