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

Unified Diff: Source/devtools/front_end/sdk/NetworkRequest.js

Issue 637523002: DevTools: use timing information for "disk cached" resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkManager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/NetworkRequest.js
diff --git a/Source/devtools/front_end/sdk/NetworkRequest.js b/Source/devtools/front_end/sdk/NetworkRequest.js
index c1dc400be32aab147b794dbd69df3332da1ebd6d..a86ea512fdb77c66122e4e4792cfe52878f746ba 100644
--- a/Source/devtools/front_end/sdk/NetworkRequest.js
+++ b/Source/devtools/front_end/sdk/NetworkRequest.js
@@ -354,16 +354,20 @@ WebInspector.NetworkRequest.prototype = {
/**
* @return {boolean}
*/
- get cached()
+ cached: function()
{
- return !!this._cached && !this._transferSize;
+ return (!!this._fromMemoryCache || !!this._fromDiskCache) && !this._transferSize;
},
- set cached(x)
+ setFromMemoryCache: function()
{
- this._cached = x;
- if (x)
- delete this._timing;
+ this._fromMemoryCache = true;
+ delete this._timing;
+ },
+
+ setFromDiskCache: function()
+ {
+ this._fromDiskCache = true;
},
/**
@@ -389,7 +393,7 @@ WebInspector.NetworkRequest.prototype = {
set timing(x)
{
- if (x && !this._cached) {
+ if (x && !this._fromMemoryCache) {
// Take startTime and responseReceivedTime from timing data for better accuracy.
// Timing's requestTime is a baseline in seconds, rest of the numbers there are ticks in millis.
this._startTime = x.requestTime;
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698