Index: Source/platform/weborigin/SchemeRegistry.cpp |
diff --git a/Source/platform/weborigin/SchemeRegistry.cpp b/Source/platform/weborigin/SchemeRegistry.cpp |
index 1b9134e966bf33887396874b7854239d27ab6f65..96cc09357431a742dd93683a9a45875050dee0c3 100644 |
--- a/Source/platform/weborigin/SchemeRegistry.cpp |
+++ b/Source/platform/weborigin/SchemeRegistry.cpp |
@@ -28,6 +28,7 @@ |
#include "platform/weborigin/SchemeRegistry.h" |
#include "wtf/MainThread.h" |
+#include "wtf/text/StringBuilder.h" |
namespace WebCore { |
@@ -256,6 +257,23 @@ bool SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled(const String& scheme) |
return CORSEnabledSchemes().contains(scheme); |
} |
+String SchemeRegistry::listOfCORSEnabledURLSchemes() |
+{ |
+ StringBuilder builder; |
+ const URLSchemesMap& corsEnabledSchemes = CORSEnabledSchemes(); |
+ |
+ bool addSeparator = false; |
+ for (URLSchemesMap::const_iterator it = corsEnabledSchemes.begin(); it != corsEnabledSchemes.end(); ++it) { |
+ if (addSeparator) |
+ builder.append(", "); |
+ else |
+ addSeparator = true; |
+ |
+ builder.append(*it); |
+ } |
+ return builder.toString(); |
+} |
+ |
void SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme) |
{ |
ContentSecurityPolicyBypassingSchemes().add(scheme); |