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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 int64_t responseTime() const { return m_responseTime; } | 275 int64_t responseTime() const { return m_responseTime; } |
276 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime;
} | 276 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime;
} |
277 | 277 |
278 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; } | 278 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; } |
279 void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = val
ue; } | 279 void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = val
ue; } |
280 | 280 |
281 unsigned short remotePort() const { return m_remotePort; } | 281 unsigned short remotePort() const { return m_remotePort; } |
282 void setRemotePort(unsigned short value) { m_remotePort = value; } | 282 void setRemotePort(unsigned short value) { m_remotePort = value; } |
283 | 283 |
| 284 long long encodedBodyLength() const { return m_encodedBodyLength; } |
| 285 void addToEncodedBodyLength(int value); |
| 286 |
| 287 long long decodedBodyLength() const { return m_decodedBodyLength; } |
| 288 void addToDecodedBodyLength(int value); |
| 289 |
284 const String& downloadedFilePath() const { return m_downloadedFilePath; } | 290 const String& downloadedFilePath() const { return m_downloadedFilePath; } |
285 void setDownloadedFilePath(const String&); | 291 void setDownloadedFilePath(const String&); |
286 | 292 |
287 // Extra data associated with this response. | 293 // Extra data associated with this response. |
288 ExtraData* getExtraData() const { return m_extraData.get(); } | 294 ExtraData* getExtraData() const { return m_extraData.get(); } |
289 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData
; } | 295 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData
; } |
290 | 296 |
291 // The ResourceResponse subclass may "shadow" this method to provide platfor
m-specific memory usage information | 297 // The ResourceResponse subclass may "shadow" this method to provide platfor
m-specific memory usage information |
292 unsigned memoryUsage() const | 298 unsigned memoryUsage() const |
293 { | 299 { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // The time at which the response headers were received. For cached | 406 // The time at which the response headers were received. For cached |
401 // responses, this time could be "far" in the past. | 407 // responses, this time could be "far" in the past. |
402 int64_t m_responseTime; | 408 int64_t m_responseTime; |
403 | 409 |
404 // Remote IP address of the socket which fetched this resource. | 410 // Remote IP address of the socket which fetched this resource. |
405 AtomicString m_remoteIPAddress; | 411 AtomicString m_remoteIPAddress; |
406 | 412 |
407 // Remote port number of the socket which fetched this resource. | 413 // Remote port number of the socket which fetched this resource. |
408 unsigned short m_remotePort; | 414 unsigned short m_remotePort; |
409 | 415 |
| 416 // Size of the response body in bytes prior to decompression. |
| 417 long long m_encodedBodyLength; |
| 418 |
| 419 // Sizes of the response body in bytes after any content-encoding is |
| 420 // removed. |
| 421 long long m_decodedBodyLength; |
| 422 |
410 // The downloaded file path if the load streamed to a file. | 423 // The downloaded file path if the load streamed to a file. |
411 String m_downloadedFilePath; | 424 String m_downloadedFilePath; |
412 | 425 |
413 // The handle to the downloaded file to ensure the underlying file will not | 426 // The handle to the downloaded file to ensure the underlying file will not |
414 // be deleted. | 427 // be deleted. |
415 RefPtr<BlobDataHandle> m_downloadedFileHandle; | 428 RefPtr<BlobDataHandle> m_downloadedFileHandle; |
416 | 429 |
417 // ExtraData associated with the response. | 430 // ExtraData associated with the response. |
418 RefPtr<ExtraData> m_extraData; | 431 RefPtr<ExtraData> m_extraData; |
419 }; | 432 }; |
(...skipping 28 matching lines...) Expand all Loading... |
448 bool m_wasAlternateProtocolAvailable; | 461 bool m_wasAlternateProtocolAvailable; |
449 bool m_wasFetchedViaProxy; | 462 bool m_wasFetchedViaProxy; |
450 bool m_wasFetchedViaServiceWorker; | 463 bool m_wasFetchedViaServiceWorker; |
451 bool m_wasFallbackRequiredByServiceWorker; | 464 bool m_wasFallbackRequiredByServiceWorker; |
452 WebServiceWorkerResponseType m_serviceWorkerResponseType; | 465 WebServiceWorkerResponseType m_serviceWorkerResponseType; |
453 KURL m_originalURLViaServiceWorker; | 466 KURL m_originalURLViaServiceWorker; |
454 String m_cacheStorageCacheName; | 467 String m_cacheStorageCacheName; |
455 int64_t m_responseTime; | 468 int64_t m_responseTime; |
456 String m_remoteIPAddress; | 469 String m_remoteIPAddress; |
457 unsigned short m_remotePort; | 470 unsigned short m_remotePort; |
| 471 long long m_encodedBodyLength; |
| 472 long long m_decodedBodyLength; |
458 String m_downloadedFilePath; | 473 String m_downloadedFilePath; |
459 RefPtr<BlobDataHandle> m_downloadedFileHandle; | 474 RefPtr<BlobDataHandle> m_downloadedFileHandle; |
460 }; | 475 }; |
461 | 476 |
462 } // namespace blink | 477 } // namespace blink |
463 | 478 |
464 #endif // ResourceResponse_h | 479 #endif // ResourceResponse_h |
OLD | NEW |