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

Unified Diff: Source/web/AssociatedURLLoader.cpp

Issue 68173029: Support full range of PreflightPolicy over WebURLLoaderOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: compile-time asserts for ensuring that PreflightPolicy enums remain sync Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebURLLoaderOptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/AssociatedURLLoader.cpp
diff --git a/Source/web/AssociatedURLLoader.cpp b/Source/web/AssociatedURLLoader.cpp
index 74103cb0fca90a7dbb68515f8eb38d1202de869d..a5763c6cb1e5bb53d92fb7083c95d15b55ea1444 100644
--- a/Source/web/AssociatedURLLoader.cpp
+++ b/Source/web/AssociatedURLLoader.cpp
@@ -310,6 +310,10 @@ COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyDeny,
COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl, UseAccessControl);
COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyAllow, AllowCrossOriginRequests);
+COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::ConsiderPreflight, ConsiderPreflight);
+COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::ForcePreflight, ForcePreflight);
+COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::PreventPreflight, PreventPreflight);
+
void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURLResponse& response, WebURLError& error, WebData& data)
{
ASSERT(0); // Synchronous loading is not supported.
@@ -342,7 +346,7 @@ void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebUR
options.sendLoadCallbacks = SendCallbacks; // Always send callbacks.
options.sniffContent = m_options.sniffContent ? SniffContent : DoNotSniffContent;
options.allowCredentials = m_options.allowCredentials ? AllowStoredCredentials : DoNotAllowStoredCredentials;
- options.preflightPolicy = m_options.forcePreflight ? ForcePreflight : ConsiderPreflight;
+ options.preflightPolicy = static_cast<WebCore::PreflightPolicy>(m_options.preflightPolicy);
options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginRequestPolicy>(m_options.crossOriginRequestPolicy);
options.dataBufferingPolicy = DoNotBufferData;
« no previous file with comments | « no previous file | public/web/WebURLLoaderOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698