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

Unified Diff: Source/core/fileapi/FileReaderLoader.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 | « no previous file | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/FileReaderLoader.cpp
diff --git a/Source/core/fileapi/FileReaderLoader.cpp b/Source/core/fileapi/FileReaderLoader.cpp
index fc3d3f61979d9991d25f886427e5f05926182ac9..8848b2ecde759c9a364bd706dd76ab5aaae1998b 100644
--- a/Source/core/fileapi/FileReaderLoader.cpp
+++ b/Source/core/fileapi/FileReaderLoader.cpp
@@ -105,19 +105,20 @@ void FileReaderLoader::startInternal(ExecutionContext& executionContext, const S
request.setHTTPHeaderField("Range", AtomicString(String::format("bytes=%d-%d", m_rangeStart, m_rangeEnd)));
ThreadableLoaderOptions options;
- options.sniffContent = DoNotSniffContent;
options.preflightPolicy = ConsiderPreflight;
- options.allowCredentials = AllowStoredCredentials;
options.crossOriginRequestPolicy = DenyCrossOriginRequests;
// FIXME: Is there a directive to which this load should be subject?
options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy;
// Use special initiator to hide the request from the inspector.
options.initiator = FetchInitiatorTypeNames::internal;
+ ResourceLoaderOptions resourceLoaderOptions;
+ resourceLoaderOptions.allowCredentials = AllowStoredCredentials;
+
if (m_client)
- m_loader = ThreadableLoader::create(executionContext, this, request, options);
+ m_loader = ThreadableLoader::create(executionContext, this, request, options, resourceLoaderOptions);
else
- ThreadableLoader::loadResourceSynchronously(executionContext, request, *this, options);
+ ThreadableLoader::loadResourceSynchronously(executionContext, request, *this, options, resourceLoaderOptions);
}
void FileReaderLoader::start(ExecutionContext* executionContext, PassRefPtr<BlobDataHandle> blobData)
« no previous file with comments | « no previous file | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698