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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/FetchRequest.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void makeCrossOriginAccessRequest(const ResourceRequest&); 89 void makeCrossOriginAccessRequest(const ResourceRequest&);
90 // Loads m_actualRequest. 90 // Loads m_actualRequest.
91 void loadActualRequest(); 91 void loadActualRequest();
92 // Clears m_actualRequest and reports access control check failure to 92 // Clears m_actualRequest and reports access control check failure to
93 // m_client. 93 // m_client.
94 void handlePreflightFailure(const String& url, const String& errorDescri ption); 94 void handlePreflightFailure(const String& url, const String& errorDescri ption);
95 // Investigates the response for the preflight request. If successful, 95 // Investigates the response for the preflight request. If successful,
96 // the actual request will be made later in handleSuccessfulFinish(). 96 // the actual request will be made later in handleSuccessfulFinish().
97 void handlePreflightResponse(unsigned long identifier, const ResourceRes ponse&); 97 void handlePreflightResponse(unsigned long identifier, const ResourceRes ponse&);
98 98
99 void loadRequest(const ResourceRequest&); 99 void loadRequest(const ResourceRequest&, ResourceLoaderOptions);
100 bool isAllowedRedirect(const KURL&) const; 100 bool isAllowedRedirect(const KURL&) const;
101 bool isAllowedByPolicy(const KURL&) const; 101 bool isAllowedByPolicy(const KURL&) const;
102 // Returns DoNotAllowStoredCredentials
103 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just
104 // returns allowCredentials value of m_resourceLoaderOptions.
105 StoredCredentials effectiveAllowCredentials() const;
102 106
103 SecurityOrigin* securityOrigin() const; 107 SecurityOrigin* securityOrigin() const;
104 108
105 ThreadableLoaderClient* m_client; 109 ThreadableLoaderClient* m_client;
106 Document& m_document; 110 Document& m_document;
107 111
108 const ThreadableLoaderOptions m_options; 112 const ThreadableLoaderOptions m_options;
113 // Some items may be overridden by m_forceDoNotAllowStoredCredentials
114 // and m_securityOrigin. In such a case, build a ResourceLoaderOptions
115 // with up-to-date values from them and this variable, and use it.
109 const ResourceLoaderOptions m_resourceLoaderOptions; 116 const ResourceLoaderOptions m_resourceLoaderOptions;
110 117
111 StoredCredentials m_allowCredentials; 118 bool m_forceDoNotAllowStoredCredentials;
112 RefPtr<SecurityOrigin> m_securityOrigin; 119 RefPtr<SecurityOrigin> m_securityOrigin;
113 120
114 bool m_sameOriginRequest; 121 bool m_sameOriginRequest;
115 bool m_simpleRequest; 122 bool m_simpleRequest;
116 bool m_async; 123 bool m_async;
117 OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Contr ol preflight checks 124
125 // Holds the original request and options for it during preflight
126 // request handling phase.
127 OwnPtr<ResourceRequest> m_actualRequest;
128 OwnPtr<ResourceLoaderOptions> m_actualOptions;
129
118 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect. 130 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect.
119 Timer<DocumentThreadableLoader> m_timeoutTimer; 131 Timer<DocumentThreadableLoader> m_timeoutTimer;
120 }; 132 };
121 133
122 } // namespace WebCore 134 } // namespace WebCore
123 135
124 #endif // DocumentThreadableLoader_h 136 #endif // DocumentThreadableLoader_h
OLDNEW
« 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