| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #ifndef ResourceResponse_h | 27 #ifndef ResourceResponse_h |
| 28 #define ResourceResponse_h | 28 #define ResourceResponse_h |
| 29 | 29 |
| 30 #include "platform/PlatformExport.h" | 30 #include "platform/PlatformExport.h" |
| 31 #include "platform/blob/BlobData.h" | 31 #include "platform/blob/BlobData.h" |
| 32 #include "platform/network/HTTPHeaderMap.h" | 32 #include "platform/network/HTTPHeaderMap.h" |
| 33 #include "platform/network/HTTPParsers.h" | 33 #include "platform/network/HTTPParsers.h" |
| 34 #include "platform/network/ResourceLoadInfo.h" | 34 #include "platform/network/ResourceLoadInfo.h" |
| 35 #include "platform/network/ResourceLoadTiming.h" | 35 #include "platform/network/ResourceLoadTiming.h" |
| 36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
| 37 #include "public/platform/WebServiceWorkerResponseType.h" |
| 37 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 39 #include "wtf/text/CString.h" | 40 #include "wtf/text/CString.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 struct CrossThreadResourceResponseData; | 44 struct CrossThreadResourceResponseData; |
| 44 | 45 |
| 45 class PLATFORM_EXPORT ResourceResponse { | 46 class PLATFORM_EXPORT ResourceResponse { |
| 46 WTF_MAKE_FAST_ALLOCATED; | 47 WTF_MAKE_FAST_ALLOCATED; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 159 |
| 159 bool wasFetchedViaProxy() const { return m_wasFetchedViaProxy; } | 160 bool wasFetchedViaProxy() const { return m_wasFetchedViaProxy; } |
| 160 void setWasFetchedViaProxy(bool value) { m_wasFetchedViaProxy = value; } | 161 void setWasFetchedViaProxy(bool value) { m_wasFetchedViaProxy = value; } |
| 161 | 162 |
| 162 bool wasFetchedViaServiceWorker() const { return m_wasFetchedViaServiceWorke
r; } | 163 bool wasFetchedViaServiceWorker() const { return m_wasFetchedViaServiceWorke
r; } |
| 163 void setWasFetchedViaServiceWorker(bool value) { m_wasFetchedViaServiceWorke
r = value; } | 164 void setWasFetchedViaServiceWorker(bool value) { m_wasFetchedViaServiceWorke
r = value; } |
| 164 | 165 |
| 165 bool wasFallbackRequiredByServiceWorker() const { return m_wasFallbackRequir
edByServiceWorker; } | 166 bool wasFallbackRequiredByServiceWorker() const { return m_wasFallbackRequir
edByServiceWorker; } |
| 166 void setWasFallbackRequiredByServiceWorker(bool value) { m_wasFallbackRequir
edByServiceWorker = value; } | 167 void setWasFallbackRequiredByServiceWorker(bool value) { m_wasFallbackRequir
edByServiceWorker = value; } |
| 167 | 168 |
| 169 WebServiceWorkerResponseType serviceWorkerResponseType() const { return m_se
rviceWorkerResponseType; } |
| 170 void setServiceWorkerResponseType(WebServiceWorkerResponseType value) { m_se
rviceWorkerResponseType = value; } |
| 171 |
| 168 bool isMultipartPayload() const { return m_isMultipartPayload; } | 172 bool isMultipartPayload() const { return m_isMultipartPayload; } |
| 169 void setIsMultipartPayload(bool value) { m_isMultipartPayload = value; } | 173 void setIsMultipartPayload(bool value) { m_isMultipartPayload = value; } |
| 170 | 174 |
| 171 double responseTime() const { return m_responseTime; } | 175 double responseTime() const { return m_responseTime; } |
| 172 void setResponseTime(double responseTime) { m_responseTime = responseTime; } | 176 void setResponseTime(double responseTime) { m_responseTime = responseTime; } |
| 173 | 177 |
| 174 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; } | 178 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; } |
| 175 void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = val
ue; } | 179 void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = val
ue; } |
| 176 | 180 |
| 177 unsigned short remotePort() const { return m_remotePort; } | 181 unsigned short remotePort() const { return m_remotePort; } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 261 |
| 258 // Was the resource fetched over an explicit proxy (HTTP, SOCKS, etc). | 262 // Was the resource fetched over an explicit proxy (HTTP, SOCKS, etc). |
| 259 bool m_wasFetchedViaProxy; | 263 bool m_wasFetchedViaProxy; |
| 260 | 264 |
| 261 // Was the resource fetched over a ServiceWorker. | 265 // Was the resource fetched over a ServiceWorker. |
| 262 bool m_wasFetchedViaServiceWorker; | 266 bool m_wasFetchedViaServiceWorker; |
| 263 | 267 |
| 264 // Was the fallback request with skip service worker flag required. | 268 // Was the fallback request with skip service worker flag required. |
| 265 bool m_wasFallbackRequiredByServiceWorker; | 269 bool m_wasFallbackRequiredByServiceWorker; |
| 266 | 270 |
| 271 // The type of the response which was fetched by the ServiceWorker. |
| 272 WebServiceWorkerResponseType m_serviceWorkerResponseType; |
| 273 |
| 267 // The time at which the response headers were received. For cached | 274 // The time at which the response headers were received. For cached |
| 268 // responses, this time could be "far" in the past. | 275 // responses, this time could be "far" in the past. |
| 269 double m_responseTime; | 276 double m_responseTime; |
| 270 | 277 |
| 271 // Remote IP address of the socket which fetched this resource. | 278 // Remote IP address of the socket which fetched this resource. |
| 272 AtomicString m_remoteIPAddress; | 279 AtomicString m_remoteIPAddress; |
| 273 | 280 |
| 274 // Remote port number of the socket which fetched this resource. | 281 // Remote port number of the socket which fetched this resource. |
| 275 unsigned short m_remotePort; | 282 unsigned short m_remotePort; |
| 276 | 283 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 306 ResourceResponse::HTTPVersion m_httpVersion; | 313 ResourceResponse::HTTPVersion m_httpVersion; |
| 307 long long m_appCacheID; | 314 long long m_appCacheID; |
| 308 KURL m_appCacheManifestURL; | 315 KURL m_appCacheManifestURL; |
| 309 bool m_isMultipartPayload; | 316 bool m_isMultipartPayload; |
| 310 bool m_wasFetchedViaSPDY; | 317 bool m_wasFetchedViaSPDY; |
| 311 bool m_wasNpnNegotiated; | 318 bool m_wasNpnNegotiated; |
| 312 bool m_wasAlternateProtocolAvailable; | 319 bool m_wasAlternateProtocolAvailable; |
| 313 bool m_wasFetchedViaProxy; | 320 bool m_wasFetchedViaProxy; |
| 314 bool m_wasFetchedViaServiceWorker; | 321 bool m_wasFetchedViaServiceWorker; |
| 315 bool m_wasFallbackRequiredByServiceWorker; | 322 bool m_wasFallbackRequiredByServiceWorker; |
| 323 WebServiceWorkerResponseType m_serviceWorkerResponseType; |
| 316 double m_responseTime; | 324 double m_responseTime; |
| 317 String m_remoteIPAddress; | 325 String m_remoteIPAddress; |
| 318 unsigned short m_remotePort; | 326 unsigned short m_remotePort; |
| 319 String m_downloadedFilePath; | 327 String m_downloadedFilePath; |
| 320 RefPtr<BlobDataHandle> m_downloadedFileHandle; | 328 RefPtr<BlobDataHandle> m_downloadedFileHandle; |
| 321 }; | 329 }; |
| 322 | 330 |
| 323 } // namespace blink | 331 } // namespace blink |
| 324 | 332 |
| 325 #endif // ResourceResponse_h | 333 #endif // ResourceResponse_h |
| OLD | NEW |