Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: Source/platform/weborigin/SchemeRegistry.cpp

Issue 54173002: Allow accessing data URL resource using CORS (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/inspector/network/network-status-non-http-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « LayoutTests/inspector/network/network-status-non-http-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698