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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js

Issue 1654063002: DevTools: Fix sorting by type in network panel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 Error: "error" 118 Error: "error"
119 } 119 }
120 120
121 /** @typedef {!{type: WebInspector.NetworkRequest.WebSocketFrameType, time: numb er, text: string, opCode: number, mask: boolean}} */ 121 /** @typedef {!{type: WebInspector.NetworkRequest.WebSocketFrameType, time: numb er, text: string, opCode: number, mask: boolean}} */
122 WebInspector.NetworkRequest.WebSocketFrame; 122 WebInspector.NetworkRequest.WebSocketFrame;
123 123
124 /** @typedef {!{time: number, eventName: string, eventId: string, data: string}} */ 124 /** @typedef {!{time: number, eventName: string, eventId: string, data: string}} */
125 WebInspector.NetworkRequest.EventSourceMessage; 125 WebInspector.NetworkRequest.EventSourceMessage;
126 126
127 WebInspector.NetworkRequest.prototype = { 127 WebInspector.NetworkRequest.prototype = {
128
129 /**
130 * @return {string}
131 */
132 displayType: function()
dgozman 2016/02/04 21:49:35 I'd move this method to NetworkDataGridNode.protot
kimwjdalsl 2016/02/04 23:05:11 Done.
133 {
134 var mimeType = this.mimeType || this.requestContentType() || "";
135 var resourceType = this.resourceType();
136 var simpleType = resourceType.name();
137 if (resourceType == WebInspector.resourceTypes.Other || resourceType == WebInspector.resourceTypes.Image)
138 simpleType = mimeType.replace(/^(application|image)\//, "");
139 return simpleType;
140 },
141
128 /** 142 /**
129 * @param {!WebInspector.NetworkRequest} other 143 * @param {!WebInspector.NetworkRequest} other
130 * @return {number} 144 * @return {number}
131 */ 145 */
132 indentityCompare: function(other) 146 indentityCompare: function(other)
133 { 147 {
134 if (this._requestId > other._requestId) 148 if (this._requestId > other._requestId)
135 return 1; 149 return 1;
136 if (this._requestId < other._requestId) 150 if (this._requestId < other._requestId)
137 return -1; 151 return -1;
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.EventSo urceMessageAdded, message); 1195 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.EventSo urceMessageAdded, message);
1182 }, 1196 },
1183 1197
1184 replayXHR: function() 1198 replayXHR: function()
1185 { 1199 {
1186 this.target().networkAgent().replayXHR(this.requestId); 1200 this.target().networkAgent().replayXHR(this.requestId);
1187 }, 1201 },
1188 1202
1189 __proto__: WebInspector.SDKObject.prototype 1203 __proto__: WebInspector.SDKObject.prototype
1190 } 1204 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698