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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
index 602c9d52e4c0fcdefd82ec476e23c5da1b85e9bb..495cef077ca94cd578c637001e29734bf2a00eef 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
@@ -125,6 +125,20 @@ WebInspector.NetworkRequest.WebSocketFrame;
WebInspector.NetworkRequest.EventSourceMessage;
WebInspector.NetworkRequest.prototype = {
+
+ /**
+ * @return {string}
+ */
+ 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.
+ {
+ var mimeType = this.mimeType || this.requestContentType() || "";
+ var resourceType = this.resourceType();
+ var simpleType = resourceType.name();
+ if (resourceType == WebInspector.resourceTypes.Other || resourceType == WebInspector.resourceTypes.Image)
+ simpleType = mimeType.replace(/^(application|image)\//, "");
+ return simpleType;
+ },
+
/**
* @param {!WebInspector.NetworkRequest} other
* @return {number}
« 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