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