| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 std::unique_ptr<WebDataConsumerHandle>) override; | 103 std::unique_ptr<WebDataConsumerHandle>) override; |
| 104 void setSerializedCachedMetadata(Resource*, const char*, size_t) override; | 104 void setSerializedCachedMetadata(Resource*, const char*, size_t) override; |
| 105 void dataReceived(Resource*, const char* data, size_t dataLength) override; | 105 void dataReceived(Resource*, const char* data, size_t dataLength) override; |
| 106 bool redirectReceived(Resource*, | 106 bool redirectReceived(Resource*, |
| 107 const ResourceRequest&, | 107 const ResourceRequest&, |
| 108 const ResourceResponse&) override; | 108 const ResourceResponse&) override; |
| 109 void redirectBlocked() override; | 109 void redirectBlocked() override; |
| 110 void dataDownloaded(Resource*, int) override; | 110 void dataDownloaded(Resource*, int) override; |
| 111 void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) override; | 111 void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) override; |
| 112 | 112 |
| 113 void cancelWithError(const ResourceError&); | |
| 114 | |
| 115 // Notify Inspector and log to console about resource response. Use this | 113 // Notify Inspector and log to console about resource response. Use this |
| 116 // method if response is not going to be finished normally. | 114 // method if response is not going to be finished normally. |
| 117 void reportResponseReceived(unsigned long identifier, | 115 void reportResponseReceived(unsigned long identifier, |
| 118 const ResourceResponse&); | 116 const ResourceResponse&); |
| 119 | 117 |
| 120 // Methods containing code to handle resource fetch results which are common | 118 // Methods containing code to handle resource fetch results which are common |
| 121 // to both sync and async mode. | 119 // to both sync and async mode. |
| 122 void handleResponse(unsigned long identifier, | 120 void handleResponse(unsigned long identifier, |
| 123 const ResourceResponse&, | 121 const ResourceResponse&, |
| 124 std::unique_ptr<WebDataConsumerHandle>); | 122 std::unique_ptr<WebDataConsumerHandle>); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 135 void loadFallbackRequestForServiceWorker(); | 133 void loadFallbackRequestForServiceWorker(); |
| 136 // Loads m_actualRequest. | 134 // Loads m_actualRequest. |
| 137 void loadActualRequest(); | 135 void loadActualRequest(); |
| 138 // Clears m_actualRequest and reports access control check failure to | 136 // Clears m_actualRequest and reports access control check failure to |
| 139 // m_client. | 137 // m_client. |
| 140 void handlePreflightFailure(const String& url, | 138 void handlePreflightFailure(const String& url, |
| 141 const String& errorDescription); | 139 const String& errorDescription); |
| 142 // Investigates the response for the preflight request. If successful, | 140 // Investigates the response for the preflight request. If successful, |
| 143 // the actual request will be made later in handleSuccessfulFinish(). | 141 // the actual request will be made later in handleSuccessfulFinish(). |
| 144 void handlePreflightResponse(const ResourceResponse&); | 142 void handlePreflightResponse(const ResourceResponse&); |
| 145 void handleError(const ResourceError&); | 143 |
| 144 void dispatchDidFailAccessControlCheck(const ResourceError&); |
| 145 void dispatchDidFail(const ResourceError&); |
| 146 | 146 |
| 147 void loadRequestAsync(const ResourceRequest&, ResourceLoaderOptions); | 147 void loadRequestAsync(const ResourceRequest&, ResourceLoaderOptions); |
| 148 void loadRequestSync(const ResourceRequest&, ResourceLoaderOptions); | 148 void loadRequestSync(const ResourceRequest&, ResourceLoaderOptions); |
| 149 | 149 |
| 150 void prepareCrossOriginRequest(ResourceRequest&); | 150 void prepareCrossOriginRequest(ResourceRequest&); |
| 151 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); | 151 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); |
| 152 bool isAllowedRedirect(const KURL&) const; | 152 bool isAllowedRedirect(const KURL&) const; |
| 153 // Returns DoNotAllowStoredCredentials if m_forceDoNotAllowStoredCredentials | 153 // Returns DoNotAllowStoredCredentials if m_forceDoNotAllowStoredCredentials |
| 154 // is set. Otherwise, just returns allowCredentials value of | 154 // is set. Otherwise, just returns allowCredentials value of |
| 155 // m_resourceLoaderOptions. | 155 // m_resourceLoaderOptions. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // used to populate the HTTP Referer header when following the redirect. | 236 // used to populate the HTTP Referer header when following the redirect. |
| 237 bool m_overrideReferrer; | 237 bool m_overrideReferrer; |
| 238 Referrer m_referrerAfterRedirect; | 238 Referrer m_referrerAfterRedirect; |
| 239 | 239 |
| 240 RawResourceClientStateChecker m_checker; | 240 RawResourceClientStateChecker m_checker; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace blink | 243 } // namespace blink |
| 244 | 244 |
| 245 #endif // DocumentThreadableLoader_h | 245 #endif // DocumentThreadableLoader_h |
| OLD | NEW |