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

Unified Diff: Source/core/workers/WorkerScriptLoader.cpp

Issue 301243015: Refactor ThreadableLoaderOptions for readability (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerScriptLoader.cpp
diff --git a/Source/core/workers/WorkerScriptLoader.cpp b/Source/core/workers/WorkerScriptLoader.cpp
index d782acfea844d8afd45d633298314dfbad130c34..d52adba41a2135185b121f35af948ff224d2eb5d 100644
--- a/Source/core/workers/WorkerScriptLoader.cpp
+++ b/Source/core/workers/WorkerScriptLoader.cpp
@@ -64,12 +64,14 @@ void WorkerScriptLoader::loadSynchronously(ExecutionContext& executionContext, c
ASSERT_WITH_SECURITY_IMPLICATION(executionContext.isWorkerGlobalScope());
ThreadableLoaderOptions options;
- options.allowCredentials = AllowStoredCredentials;
options.crossOriginRequestPolicy = crossOriginRequestPolicy;
// FIXME: Should we add EnforceScriptSrcDirective here?
options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy;
- WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(executionContext), *request, *this, options);
+ ResourceLoaderOptions resourceLoaderOptions;
+ resourceLoaderOptions.allowCredentials = AllowStoredCredentials;
+
+ WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(executionContext), *request, *this, options, resourceLoaderOptions);
}
void WorkerScriptLoader::loadAsynchronously(ExecutionContext& executionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, WorkerScriptLoaderClient* client)
@@ -83,12 +85,14 @@ void WorkerScriptLoader::loadAsynchronously(ExecutionContext& executionContext,
return;
ThreadableLoaderOptions options;
- options.allowCredentials = AllowStoredCredentials;
options.crossOriginRequestPolicy = crossOriginRequestPolicy;
+ ResourceLoaderOptions resourceLoaderOptions;
+ resourceLoaderOptions.allowCredentials = AllowStoredCredentials;
+
// During create, callbacks may happen which remove the last reference to this object.
RefPtr<WorkerScriptLoader> protect(this);
- m_threadableLoader = ThreadableLoader::create(executionContext, this, *request, options);
+ m_threadableLoader = ThreadableLoader::create(executionContext, this, *request, options, resourceLoaderOptions);
}
const KURL& WorkerScriptLoader::responseURL() const
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698