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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // about origin. Only for handling the initial load (including fallback | 97 // about origin. Only for handling the initial load (including fallback |
98 // after consulting ServiceWorker). | 98 // after consulting ServiceWorker). |
99 void dispatchInitialRequest(const ResourceRequest&); | 99 void dispatchInitialRequest(const ResourceRequest&); |
100 void makeCrossOriginAccessRequest(const ResourceRequest&); | 100 void makeCrossOriginAccessRequest(const ResourceRequest&); |
101 // Loads m_fallbackRequestForServiceWorker. | 101 // Loads m_fallbackRequestForServiceWorker. |
102 void loadFallbackRequestForServiceWorker(); | 102 void loadFallbackRequestForServiceWorker(); |
103 // Loads m_actualRequest. | 103 // Loads m_actualRequest. |
104 void loadActualRequest(); | 104 void loadActualRequest(); |
105 // Clears m_actualRequest and reports access control check failure to | 105 // Clears m_actualRequest and reports access control check failure to |
106 // m_client. | 106 // m_client. |
107 // In DocumentThreadableLoader, call handleAccessControlCheckFailure() | 107 void handlePreflightFailure(const String& url, const String& errorDescri
ption); |
108 // instead of m_client->didFailAccessControlCheck(). | |
109 void handleAccessControlCheckFailure(const String& url, const String& er
rorDescription); | |
110 // Investigates the response for the preflight request. If successful, | 108 // Investigates the response for the preflight request. If successful, |
111 // the actual request will be made later in handleSuccessfulFinish(). | 109 // the actual request will be made later in handleSuccessfulFinish(). |
112 void handlePreflightResponse(const ResourceResponse&); | 110 void handlePreflightResponse(const ResourceResponse&); |
113 | 111 |
114 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); | 112 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); |
115 bool isAllowedRedirect(const KURL&) const; | 113 bool isAllowedRedirect(const KURL&) const; |
116 bool isAllowedByContentSecurityPolicy(const KURL&) const; | 114 bool isAllowedByContentSecurityPolicy(const KURL&) const; |
117 // Returns DoNotAllowStoredCredentials | 115 // Returns DoNotAllowStoredCredentials |
118 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just | 116 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just |
119 // returns allowCredentials value of m_resourceLoaderOptions. | 117 // returns allowCredentials value of m_resourceLoaderOptions. |
(...skipping 29 matching lines...) Expand all Loading... |
149 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. | 147 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. |
150 Timer<DocumentThreadableLoader> m_timeoutTimer; | 148 Timer<DocumentThreadableLoader> m_timeoutTimer; |
151 double m_requestStartedSeconds; // Time an asynchronous fetch request is
started | 149 double m_requestStartedSeconds; // Time an asynchronous fetch request is
started |
152 | 150 |
153 // Max number of times that this DocumentThreadableLoader can follow | 151 // Max number of times that this DocumentThreadableLoader can follow |
154 // cross-origin redirects. | 152 // cross-origin redirects. |
155 // This is used to limit the number of redirects. | 153 // This is used to limit the number of redirects. |
156 // But this value is not the max number of total redirects allowed, | 154 // But this value is not the max number of total redirects allowed, |
157 // because same-origin redirects are not counted here. | 155 // because same-origin redirects are not counted here. |
158 int m_corsRedirectLimit; | 156 int m_corsRedirectLimit; |
159 | |
160 bool m_accessControlCheckFailed; | |
161 }; | 157 }; |
162 | 158 |
163 } // namespace blink | 159 } // namespace blink |
164 | 160 |
165 #endif // DocumentThreadableLoader_h | 161 #endif // DocumentThreadableLoader_h |
OLD | NEW |