OLD | NEW |
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 Loading... |
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 | 102 |
103 SecurityOrigin* securityOrigin() const; | 103 SecurityOrigin* securityOrigin() const; |
104 | 104 |
105 ThreadableLoaderClient* m_client; | 105 ThreadableLoaderClient* m_client; |
106 Document& m_document; | 106 Document& m_document; |
107 | 107 |
108 const ThreadableLoaderOptions m_options; | 108 const ThreadableLoaderOptions m_options; |
| 109 // Some items may be overridden by m_allowCredentials and |
| 110 // m_securityOrigin. In such a case, build a ResourceLoaderOptions with |
| 111 // up-to-date values from them and this variable, and use it. |
109 const ResourceLoaderOptions m_resourceLoaderOptions; | 112 const ResourceLoaderOptions m_resourceLoaderOptions; |
110 | 113 |
111 StoredCredentials m_allowCredentials; | 114 StoredCredentials m_allowCredentials; |
112 RefPtr<SecurityOrigin> m_securityOrigin; | 115 RefPtr<SecurityOrigin> m_securityOrigin; |
113 | 116 |
114 bool m_sameOriginRequest; | 117 bool m_sameOriginRequest; |
115 bool m_simpleRequest; | 118 bool m_simpleRequest; |
116 bool m_async; | 119 bool m_async; |
117 OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Contr
ol preflight checks | 120 |
| 121 // Holds the original request and options for it during preflight |
| 122 // request handling phase. |
| 123 OwnPtr<ResourceRequest> m_actualRequest; |
| 124 OwnPtr<ResourceLoaderOptions> m_actualOptions; |
| 125 |
118 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. | 126 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. |
119 Timer<DocumentThreadableLoader> m_timeoutTimer; | 127 Timer<DocumentThreadableLoader> m_timeoutTimer; |
120 }; | 128 }; |
121 | 129 |
122 } // namespace WebCore | 130 } // namespace WebCore |
123 | 131 |
124 #endif // DocumentThreadableLoader_h | 132 #endif // DocumentThreadableLoader_h |
OLD | NEW |