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

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: Fix lint error: ASSERT -> DCHECK 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 int64_t responseTime() const { return m_responseTime; } 234 int64_t responseTime() const { return m_responseTime; }
235 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; } 235 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; }
236 236
237 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; } 237 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; }
238 void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = val ue; } 238 void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = val ue; }
239 239
240 unsigned short remotePort() const { return m_remotePort; } 240 unsigned short remotePort() const { return m_remotePort; }
241 void setRemotePort(unsigned short value) { m_remotePort = value; } 241 void setRemotePort(unsigned short value) { m_remotePort = value; }
242 242
243 long long encodedBodyLength() const { return m_encodedBodyLength; }
244 void addToEncodedBodyLength(int value);
245
246 long long decodedBodyLength() const { return m_decodedBodyLength; }
247 void addToDecodedBodyLength(int value);
248
243 const String& downloadedFilePath() const { return m_downloadedFilePath; } 249 const String& downloadedFilePath() const { return m_downloadedFilePath; }
244 void setDownloadedFilePath(const String&); 250 void setDownloadedFilePath(const String&);
245 251
246 // Extra data associated with this response. 252 // Extra data associated with this response.
247 ExtraData* getExtraData() const { return m_extraData.get(); } 253 ExtraData* getExtraData() const { return m_extraData.get(); }
248 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData ; } 254 void setExtraData(PassRefPtr<ExtraData> extraData) { m_extraData = extraData ; }
249 255
250 // The ResourceResponse subclass may "shadow" this method to provide platfor m-specific memory usage information 256 // The ResourceResponse subclass may "shadow" this method to provide platfor m-specific memory usage information
251 unsigned memoryUsage() const 257 unsigned memoryUsage() const
252 { 258 {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // The time at which the response headers were received. For cached 365 // The time at which the response headers were received. For cached
360 // responses, this time could be "far" in the past. 366 // responses, this time could be "far" in the past.
361 int64_t m_responseTime; 367 int64_t m_responseTime;
362 368
363 // Remote IP address of the socket which fetched this resource. 369 // Remote IP address of the socket which fetched this resource.
364 AtomicString m_remoteIPAddress; 370 AtomicString m_remoteIPAddress;
365 371
366 // Remote port number of the socket which fetched this resource. 372 // Remote port number of the socket which fetched this resource.
367 unsigned short m_remotePort; 373 unsigned short m_remotePort;
368 374
375 // Size of the response body in bytes prior to decompression.
376 long long m_encodedBodyLength;
377
378 // Sizes of the response body in bytes after any content-encoding is
379 // removed.
380 long long m_decodedBodyLength;
381
369 // The downloaded file path if the load streamed to a file. 382 // The downloaded file path if the load streamed to a file.
370 String m_downloadedFilePath; 383 String m_downloadedFilePath;
371 384
372 // The handle to the downloaded file to ensure the underlying file will not 385 // The handle to the downloaded file to ensure the underlying file will not
373 // be deleted. 386 // be deleted.
374 RefPtr<BlobDataHandle> m_downloadedFileHandle; 387 RefPtr<BlobDataHandle> m_downloadedFileHandle;
375 388
376 // ExtraData associated with the response. 389 // ExtraData associated with the response.
377 RefPtr<ExtraData> m_extraData; 390 RefPtr<ExtraData> m_extraData;
378 }; 391 };
(...skipping 28 matching lines...) Expand all
407 bool m_wasAlternateProtocolAvailable; 420 bool m_wasAlternateProtocolAvailable;
408 bool m_wasFetchedViaProxy; 421 bool m_wasFetchedViaProxy;
409 bool m_wasFetchedViaServiceWorker; 422 bool m_wasFetchedViaServiceWorker;
410 bool m_wasFallbackRequiredByServiceWorker; 423 bool m_wasFallbackRequiredByServiceWorker;
411 WebServiceWorkerResponseType m_serviceWorkerResponseType; 424 WebServiceWorkerResponseType m_serviceWorkerResponseType;
412 KURL m_originalURLViaServiceWorker; 425 KURL m_originalURLViaServiceWorker;
413 String m_cacheStorageCacheName; 426 String m_cacheStorageCacheName;
414 int64_t m_responseTime; 427 int64_t m_responseTime;
415 String m_remoteIPAddress; 428 String m_remoteIPAddress;
416 unsigned short m_remotePort; 429 unsigned short m_remotePort;
430 long long m_encodedBodyLength;
431 long long m_decodedBodyLength;
417 String m_downloadedFilePath; 432 String m_downloadedFilePath;
418 RefPtr<BlobDataHandle> m_downloadedFileHandle; 433 RefPtr<BlobDataHandle> m_downloadedFileHandle;
419 }; 434 };
420 435
421 } // namespace blink 436 } // namespace blink
422 437
423 #endif // ResourceResponse_h 438 #endif // ResourceResponse_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698