Chromium Code Reviews| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 void notifyResponseReceived(unsigned long identifier, const ResourceResp onse&); | 85 void notifyResponseReceived(unsigned long identifier, const ResourceResp onse&); |
| 86 | 86 |
| 87 // Methods containing code to handle resource fetch results which is | 87 // Methods containing code to handle resource fetch results which is |
| 88 // common to both sync and async mode. | 88 // common to both sync and async mode. |
| 89 void handleResponse(unsigned long identifier, const ResourceResponse&); | 89 void handleResponse(unsigned long identifier, const ResourceResponse&); |
| 90 void handleReceivedData(const char* data, unsigned dataLength); | 90 void handleReceivedData(const char* data, unsigned dataLength); |
| 91 void handleSuccessfulFinish(unsigned long identifier, double finishTime) ; | 91 void handleSuccessfulFinish(unsigned long identifier, double finishTime) ; |
| 92 | 92 |
| 93 void didTimeout(Timer<DocumentThreadableLoader>*); | 93 void didTimeout(Timer<DocumentThreadableLoader>*); |
| 94 void makeCrossOriginAccessRequest(const ResourceRequest&); | 94 void makeCrossOriginAccessRequest(const ResourceRequest&); |
| 95 // Loads m_fallbackRequest. | |
| 96 void loadFallbackRequest(); | |
| 95 // Loads m_actualRequest. | 97 // Loads m_actualRequest. |
| 96 void loadActualRequest(); | 98 void loadActualRequest(); |
| 97 // Clears m_actualRequest and reports access control check failure to | 99 // Clears m_actualRequest and reports access control check failure to |
| 98 // m_client. | 100 // m_client. |
| 99 void handlePreflightFailure(const String& url, const String& errorDescri ption); | 101 void handlePreflightFailure(const String& url, const String& errorDescri ption); |
| 100 // Investigates the response for the preflight request. If successful, | 102 // Investigates the response for the preflight request. If successful, |
| 101 // the actual request will be made later in handleSuccessfulFinish(). | 103 // the actual request will be made later in handleSuccessfulFinish(). |
| 102 void handlePreflightResponse(const ResourceResponse&); | 104 void handlePreflightResponse(const ResourceResponse&); |
| 103 | 105 |
| 104 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); | 106 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 120 // with up-to-date values from them and this variable, and use it. | 122 // with up-to-date values from them and this variable, and use it. |
| 121 const ResourceLoaderOptions m_resourceLoaderOptions; | 123 const ResourceLoaderOptions m_resourceLoaderOptions; |
| 122 | 124 |
| 123 bool m_forceDoNotAllowStoredCredentials; | 125 bool m_forceDoNotAllowStoredCredentials; |
| 124 RefPtr<SecurityOrigin> m_securityOrigin; | 126 RefPtr<SecurityOrigin> m_securityOrigin; |
| 125 | 127 |
| 126 bool m_sameOriginRequest; | 128 bool m_sameOriginRequest; |
| 127 bool m_simpleRequest; | 129 bool m_simpleRequest; |
| 128 bool m_async; | 130 bool m_async; |
| 129 | 131 |
| 132 // Holds the original request for fallback of fetching via the ServiceWo rker. | |
|
yhirano
2014/10/07 08:03:15
Please wrap this comment in 80 columns.
horo
2014/10/08 02:34:56
Done.
| |
| 133 OwnPtr<ResourceRequest> m_fallbackRequest; | |
| 130 // Holds the original request and options for it during preflight | 134 // Holds the original request and options for it during preflight |
| 131 // request handling phase. | 135 // request handling phase. |
| 132 OwnPtr<ResourceRequest> m_actualRequest; | 136 OwnPtr<ResourceRequest> m_actualRequest; |
| 133 OwnPtr<ResourceLoaderOptions> m_actualOptions; | 137 OwnPtr<ResourceLoaderOptions> m_actualOptions; |
| 134 | 138 |
| 135 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect. | 139 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect. |
| 136 Timer<DocumentThreadableLoader> m_timeoutTimer; | 140 Timer<DocumentThreadableLoader> m_timeoutTimer; |
| 137 double m_requestStartedSeconds; // Time an asynchronous fetch request is started | 141 double m_requestStartedSeconds; // Time an asynchronous fetch request is started |
| 138 }; | 142 }; |
| 139 | 143 |
| 140 } // namespace blink | 144 } // namespace blink |
| 141 | 145 |
| 142 #endif // DocumentThreadableLoader_h | 146 #endif // DocumentThreadableLoader_h |
| OLD | NEW |