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

Unified Diff: Source/core/page/EventSource.cpp

Issue 301243015: Refactor ThreadableLoaderOptions for readability (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/page/EventSource.cpp
diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
index 493e36043b803c147bd473a88bed0b5a65fad898..bc8e2b403204c3d16b2f9b3bc541676e4d4be392 100644
--- a/Source/core/page/EventSource.cpp
+++ b/Source/core/page/EventSource.cpp
@@ -137,16 +137,18 @@ void EventSource::connect()
SecurityOrigin* origin = executionContext.securityOrigin();
ThreadableLoaderOptions options;
- options.sniffContent = DoNotSniffContent;
- options.allowCredentials = (origin->canRequest(m_url) || m_withCredentials) ? AllowStoredCredentials : DoNotAllowStoredCredentials;
- options.credentialsRequested = m_withCredentials ? ClientRequestedCredentials : ClientDidNotRequestCredentials;
options.preflightPolicy = PreventPreflight;
options.crossOriginRequestPolicy = UseAccessControl;
- options.dataBufferingPolicy = DoNotBufferData;
- options.securityOrigin = origin;
options.contentSecurityPolicyEnforcement = ContentSecurityPolicy::shouldBypassMainWorld(&executionContext) ? DoNotEnforceContentSecurityPolicy : EnforceConnectSrcDirective;
- m_loader = ThreadableLoader::create(executionContext, this, request, options);
+ ResourceLoaderOptions resourceLoaderOptions;
+ resourceLoaderOptions.sniffContent = DoNotSniffContent;
tkent 2014/06/02 08:08:56 Ditto.
tyoshino (SeeGerritForStatus) 2014/06/02 08:21:35 Done.
+ resourceLoaderOptions.allowCredentials = (origin->canRequest(m_url) || m_withCredentials) ? AllowStoredCredentials : DoNotAllowStoredCredentials;
+ resourceLoaderOptions.credentialsRequested = m_withCredentials ? ClientRequestedCredentials : ClientDidNotRequestCredentials;
+ resourceLoaderOptions.dataBufferingPolicy = DoNotBufferData;
+ resourceLoaderOptions.securityOrigin = origin;
+
+ m_loader = ThreadableLoader::create(executionContext, this, request, options, resourceLoaderOptions);
if (m_loader)
m_requestInFlight = true;

Powered by Google App Engine
This is Rietveld 408576698