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

Side by Side Diff: Source/devtools/front_end/sdk/NetworkManager.js

Issue 515583005: Add ServiceWorker timing information on the popup panel in DevTools's Network tab (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 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
« no previous file with comments | « Source/devtools/front_end/networkPanel.css ('k') | Source/devtools/protocol.json » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 networkRequest.setRequestHeadersText(response.requestHeadersText || ""); 198 networkRequest.setRequestHeadersText(response.requestHeadersText || "");
199 } 199 }
200 200
201 networkRequest.connectionReused = response.connectionReused; 201 networkRequest.connectionReused = response.connectionReused;
202 networkRequest.connectionId = String(response.connectionId); 202 networkRequest.connectionId = String(response.connectionId);
203 if (response.remoteIPAddress) 203 if (response.remoteIPAddress)
204 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r emotePort || -1); 204 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r emotePort || -1);
205 205
206 if (response.fromServiceWorker) 206 if (response.fromServiceWorker)
207 networkRequest.fetchedViaServiceWorker = true; 207 networkRequest.fetchedViaServiceWorker = true;
208 else if (response.fromDiskCache) 208
209 if (response.fromDiskCache)
209 networkRequest.cached = true; 210 networkRequest.cached = true;
210 else 211 else
211 networkRequest.timing = response.timing; 212 networkRequest.timing = response.timing;
212 213
213 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { 214 if (!this._mimeTypeIsConsistentWithType(networkRequest)) {
214 var consoleModel = this._manager._target.consoleModel; 215 var consoleModel = this._manager._target.consoleModel;
215 consoleModel.addMessage(new WebInspector.ConsoleMessage(consoleModel .target(), WebInspector.ConsoleMessage.MessageSource.Network, 216 consoleModel.addMessage(new WebInspector.ConsoleMessage(consoleModel .target(), WebInspector.ConsoleMessage.MessageSource.Network,
216 WebInspector.ConsoleMessage.MessageLevel.Log, 217 WebInspector.ConsoleMessage.MessageLevel.Log,
217 WebInspector.UIString("Resource interpreted as %s but transferre d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT ype, networkRequest.url), 218 WebInspector.UIString("Resource interpreted as %s but transferre d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT ype, networkRequest.url),
218 WebInspector.ConsoleMessage.MessageType.Log, 219 WebInspector.ConsoleMessage.MessageType.Log,
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 * @param {!NetworkAgent.LoaderId} loaderId 566 * @param {!NetworkAgent.LoaderId} loaderId
566 * @param {string} url 567 * @param {string} url
567 * @param {string} documentURL 568 * @param {string} documentURL
568 * @param {?NetworkAgent.Initiator} initiator 569 * @param {?NetworkAgent.Initiator} initiator
569 */ 570 */
570 _createNetworkRequest: function(requestId, frameId, loaderId, url, documentU RL, initiator) 571 _createNetworkRequest: function(requestId, frameId, loaderId, url, documentU RL, initiator)
571 { 572 {
572 return new WebInspector.NetworkRequest(this._manager._target, requestId, url, documentURL, frameId, loaderId, initiator); 573 return new WebInspector.NetworkRequest(this._manager._target, requestId, url, documentURL, frameId, loaderId, initiator);
573 } 574 }
574 } 575 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/networkPanel.css ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698