| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @param {!WebInspector.TimelineModel} model | 8 * @param {!WebInspector.TimelineModel} model |
| 9 */ | 9 */ |
| 10 WebInspector.TimelineTreeView = function(model) | 10 WebInspector.TimelineTreeView = function(model) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 return WebInspector.TimelineTreeView.eventURL(node.event) || ""; | 181 return WebInspector.TimelineTreeView.eventURL(node.event) || ""; |
| 182 } | 182 } |
| 183 | 183 |
| 184 /** | 184 /** |
| 185 * @param {boolean} groupSubdomains | 185 * @param {boolean} groupSubdomains |
| 186 * @param {!WebInspector.TimelineModel.ProfileTreeNode} node | 186 * @param {!WebInspector.TimelineModel.ProfileTreeNode} node |
| 187 * @return {string} | 187 * @return {string} |
| 188 */ | 188 */ |
| 189 function groupByDomain(groupSubdomains, node) | 189 function groupByDomain(groupSubdomains, node) |
| 190 { | 190 { |
| 191 var parsedURL = (WebInspector.TimelineTreeView.eventURL(node.event)
|| "").asParsedURL(); | 191 var url = WebInspector.TimelineTreeView.eventURL(node.event) || ""; |
| 192 if (url.startsWith("extensions::")) |
| 193 return groupSubdomains ? WebInspector.UIString("Chrome Extension
s Overhead") : url; |
| 194 var parsedURL = url.asParsedURL(); |
| 192 if (!parsedURL) | 195 if (!parsedURL) |
| 193 return ""; | 196 return ""; |
| 194 if (parsedURL.scheme === "chrome-extension") { | 197 if (parsedURL.scheme === "chrome-extension") { |
| 195 var url = parsedURL.scheme + "://" + parsedURL.host; | 198 url = parsedURL.scheme + "://" + parsedURL.host; |
| 196 var displayName = executionContextNamesByOrigin.get(url); | 199 var displayName = executionContextNamesByOrigin.get(url); |
| 197 return displayName ? WebInspector.UIString("Chrome Extension: %s
", displayName) : url; | 200 return displayName ? WebInspector.UIString("Chrome Extension: %s
", displayName) : url; |
| 198 } | 201 } |
| 199 if (!groupSubdomains) | 202 if (!groupSubdomains) |
| 200 return parsedURL.host; | 203 return parsedURL.host; |
| 201 if (/^[.0-9]+$/.test(parsedURL.host)) | 204 if (/^[.0-9]+$/.test(parsedURL.host)) |
| 202 return parsedURL.host; | 205 return parsedURL.host; |
| 203 var domainMatch = /([^.]*\.)?[^.]*$/.exec(parsedURL.host); | 206 var domainMatch = /([^.]*\.)?[^.]*$/.exec(parsedURL.host); |
| 204 return domainMatch && domainMatch[0] || ""; | 207 return domainMatch && domainMatch[0] || ""; |
| 205 } | 208 } |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 if (!this._profileNode.children) | 416 if (!this._profileNode.children) |
| 414 return; | 417 return; |
| 415 for (var node of this._profileNode.children.values()) { | 418 for (var node of this._profileNode.children.values()) { |
| 416 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this
._totalTime, this._maxTimes.self, this._maxTimes.total); | 419 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this
._totalTime, this._maxTimes.self, this._maxTimes.total); |
| 417 this.insertChildOrdered(gridNode); | 420 this.insertChildOrdered(gridNode); |
| 418 } | 421 } |
| 419 }, | 422 }, |
| 420 | 423 |
| 421 __proto__: WebInspector.SortableDataGridNode.prototype | 424 __proto__: WebInspector.SortableDataGridNode.prototype |
| 422 } | 425 } |
| OLD | NEW |