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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 static URLSchemesMap& CORSEnabledSchemes() | 130 static URLSchemesMap& CORSEnabledSchemes() |
131 { | 131 { |
132 // FIXME: http://bugs.webkit.org/show_bug.cgi?id=77160 | 132 // FIXME: http://bugs.webkit.org/show_bug.cgi?id=77160 |
133 DEFINE_STATIC_LOCAL(URLSchemesMap, CORSEnabledSchemes, ()); | 133 DEFINE_STATIC_LOCAL(URLSchemesMap, CORSEnabledSchemes, ()); |
134 | 134 |
135 if (CORSEnabledSchemes.isEmpty()) { | 135 if (CORSEnabledSchemes.isEmpty()) { |
136 CORSEnabledSchemes.add("http"); | 136 CORSEnabledSchemes.add("http"); |
137 CORSEnabledSchemes.add("https"); | 137 CORSEnabledSchemes.add("https"); |
| 138 CORSEnabledSchemes.add("data"); |
138 } | 139 } |
139 | 140 |
140 return CORSEnabledSchemes; | 141 return CORSEnabledSchemes; |
141 } | 142 } |
142 | 143 |
143 static URLSchemesMap& ContentSecurityPolicyBypassingSchemes() | 144 static URLSchemesMap& ContentSecurityPolicyBypassingSchemes() |
144 { | 145 { |
145 DEFINE_STATIC_LOCAL(URLSchemesMap, schemes, ()); | 146 DEFINE_STATIC_LOCAL(URLSchemesMap, schemes, ()); |
146 return schemes; | 147 return schemes; |
147 } | 148 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 267 } |
267 | 268 |
268 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
e) | 269 bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
e) |
269 { | 270 { |
270 if (scheme.isEmpty()) | 271 if (scheme.isEmpty()) |
271 return false; | 272 return false; |
272 return ContentSecurityPolicyBypassingSchemes().contains(scheme); | 273 return ContentSecurityPolicyBypassingSchemes().contains(scheme); |
273 } | 274 } |
274 | 275 |
275 } // namespace WebCore | 276 } // namespace WebCore |
OLD | NEW |