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

Unified Diff: Source/core/loader/DocumentThreadableLoader.h

Issue 312653002: ResourceLoaderOptions also must be updated by updateRequestForAccessControl() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed #5 Created 6 years, 6 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/fetch/FetchRequest.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentThreadableLoader.h
diff --git a/Source/core/loader/DocumentThreadableLoader.h b/Source/core/loader/DocumentThreadableLoader.h
index 46299625af30433d7034d976bcc9dd17af5b219f..54e8b2494bb2917e80d0bc2e53a717cb5d448473 100644
--- a/Source/core/loader/DocumentThreadableLoader.h
+++ b/Source/core/loader/DocumentThreadableLoader.h
@@ -96,9 +96,13 @@ class DocumentThreadableLoader FINAL : public ThreadableLoader, private Resource
// the actual request will be made later in handleSuccessfulFinish().
void handlePreflightResponse(unsigned long identifier, const ResourceResponse&);
- void loadRequest(const ResourceRequest&);
+ void loadRequest(const ResourceRequest&, ResourceLoaderOptions);
bool isAllowedRedirect(const KURL&) const;
bool isAllowedByPolicy(const KURL&) const;
+ // Returns DoNotAllowStoredCredentials
+ // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just
+ // returns allowCredentials value of m_resourceLoaderOptions.
+ StoredCredentials effectiveAllowCredentials() const;
SecurityOrigin* securityOrigin() const;
@@ -106,15 +110,23 @@ class DocumentThreadableLoader FINAL : public ThreadableLoader, private Resource
Document& m_document;
const ThreadableLoaderOptions m_options;
+ // Some items may be overridden by m_forceDoNotAllowStoredCredentials
+ // and m_securityOrigin. In such a case, build a ResourceLoaderOptions
+ // with up-to-date values from them and this variable, and use it.
const ResourceLoaderOptions m_resourceLoaderOptions;
- StoredCredentials m_allowCredentials;
+ bool m_forceDoNotAllowStoredCredentials;
RefPtr<SecurityOrigin> m_securityOrigin;
bool m_sameOriginRequest;
bool m_simpleRequest;
bool m_async;
- OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Control preflight checks
+
+ // Holds the original request and options for it during preflight
+ // request handling phase.
+ OwnPtr<ResourceRequest> m_actualRequest;
+ OwnPtr<ResourceLoaderOptions> m_actualOptions;
+
HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers in case of a cross-origin redirect.
Timer<DocumentThreadableLoader> m_timeoutTimer;
};
« no previous file with comments | « Source/core/fetch/FetchRequest.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698