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

Side by Side Diff: Source/devtools/front_end/NetworkRequest.js

Issue 23308009: [DevTools] Save as HAR: classify time before network activity as "blocked". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/HAREntry.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this._documentURL = documentURL; 45 this._documentURL = documentURL;
46 this._frameId = frameId; 46 this._frameId = frameId;
47 this._loaderId = loaderId; 47 this._loaderId = loaderId;
48 this._startTime = -1; 48 this._startTime = -1;
49 this._endTime = -1; 49 this._endTime = -1;
50 50
51 this.statusCode = 0; 51 this.statusCode = 0;
52 this.statusText = ""; 52 this.statusText = "";
53 this.requestMethod = ""; 53 this.requestMethod = "";
54 this.requestTime = 0; 54 this.requestTime = 0;
55 this.receiveHeadersEnd = 0;
56 55
57 this._type = WebInspector.resourceTypes.Other; 56 this._type = WebInspector.resourceTypes.Other;
58 this._contentEncoded = false; 57 this._contentEncoded = false;
59 this._pendingContentCallbacks = []; 58 this._pendingContentCallbacks = [];
60 this._frames = []; 59 this._frames = [];
61 60
62 this._responseHeaderValues = {}; 61 this._responseHeaderValues = {};
63 } 62 }
64 63
65 WebInspector.NetworkRequest.Events = { 64 WebInspector.NetworkRequest.Events = {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 get latency() 205 get latency()
207 { 206 {
208 if (this._responseReceivedTime === -1 || this._startTime === -1) 207 if (this._responseReceivedTime === -1 || this._startTime === -1)
209 return -1; 208 return -1;
210 return this._responseReceivedTime - this._startTime; 209 return this._responseReceivedTime - this._startTime;
211 }, 210 },
212 211
213 /** 212 /**
214 * @return {number} 213 * @return {number}
215 */ 214 */
216 get receiveDuration()
217 {
218 if (this._endTime === -1 || this._responseReceivedTime === -1)
219 return -1;
220 return this._endTime - this._responseReceivedTime;
221 },
222
223 /**
224 * @return {number}
225 */
226 get resourceSize() 215 get resourceSize()
227 { 216 {
228 return this._resourceSize || 0; 217 return this._resourceSize || 0;
229 }, 218 },
230 219
231 set resourceSize(x) 220 set resourceSize(x)
232 { 221 {
233 this._resourceSize = x; 222 this._resourceSize = x;
234 }, 223 },
235 224
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 */ 962 */
974 _pushFrame: function(frameOrError) 963 _pushFrame: function(frameOrError)
975 { 964 {
976 if (this._frames.length >= 100) 965 if (this._frames.length >= 100)
977 this._frames.splice(0, 10); 966 this._frames.splice(0, 10);
978 this._frames.push(frameOrError); 967 this._frames.push(frameOrError);
979 }, 968 },
980 969
981 __proto__: WebInspector.Object.prototype 970 __proto__: WebInspector.Object.prototype
982 } 971 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/HAREntry.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698