Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceResponse.h

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Initialise encoded_body_length for sync XHR to data: URLs Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698