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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 2788793002: [Devtools] Added frame grouping to network panel (Closed)
Patch Set: [Devtools] Added frame grouping to network panel Created 3 years, 9 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
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index 4cef0d366be55bae10ee8ff96e56376d9abfc7d1..3181c1eb27c4664bd8ede0494c984e7e97e39896 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -353,6 +353,7 @@ Network.NetworkLogView = class extends UI.VBox {
*/
setGrouping(grouping) {
this._activeGroupLookup = grouping;
+ this._nodeGroups.clear();
this._invalidateAllItems();
}
@@ -874,16 +875,18 @@ Network.NetworkLogView = class extends UI.VBox {
if (!this._activeGroupLookup)
return this._dataGrid.rootNode();
- var groupName = this._activeGroupLookup.lookup(node.request());
- if (!groupName)
+ var groupResultTuple = this._activeGroupLookup.lookupNameForRequest(node.request());
+ if (!groupResultTuple)
return this._dataGrid.rootNode();
- var group = this._nodeGroups.get(groupName);
+ var groupKey = groupResultTuple[0];
+ var groupName = groupResultTuple[1];
+ var group = this._nodeGroups.get(groupKey);
if (group)
return group;
group = new Network.NetworkGroupNode(this, groupName);
group.setColumnExtensions(this._columns.columnExtensions());
- this._nodeGroups.set(groupName, group);
+ this._nodeGroups.set(groupKey, group);
return group;
}
@@ -1808,7 +1811,12 @@ Network.NetworkGroupLookupInterface = function() {};
Network.NetworkGroupLookupInterface.prototype = {
/**
* @param {!SDK.NetworkRequest} request
- * @return {?string}
+ * @return {?Network.NetworkGroupLookupInterface.LookupKeyNameTuple}
*/
- lookup(request) {}
+ lookupNameForRequest(request) {}
};
+
+/**
+ * @typedef {!Array<string>}
+ */
+Network.NetworkGroupLookupInterface.LookupKeyNameTuple;
pfeldman 2017/03/30 23:45:50 use an objects with key and value fields instead.

Powered by Google App Engine
This is Rietveld 408576698