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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js

Issue 2668413003: DevTools: extract NetworkConditionsSelector into its own module (Closed)
Patch Set: rebaseline Created 3 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
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
index 08c90933a253f1c2f857a5aba5fb6d50dd6e83aa..36ef2aaa69661d9d881ea9502c71527ffad78468 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
@@ -286,7 +286,7 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
if (typeof request.priority === 'string') {
var div = contents.createChild('span');
div.textContent =
- Components.uiLabelForPriority(/** @type {!Protocol.Network.ResourcePriority} */ (request.priority));
+ NetworkConditions.uiLabelForPriority(/** @type {!Protocol.Network.ResourcePriority} */ (request.priority));
div.style.color = this._colorForPriority(request.priority) || 'black';
}
contents.createChild('span').textContent = request.url.trimMiddle(maxURLChars);
@@ -301,11 +301,9 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
if (!this._priorityToValue) {
var priorities = Protocol.Network.ResourcePriority;
this._priorityToValue = new Map([
- [priorities.VeryLow, 1],
- [priorities.Low, 2],
- [priorities.Medium, 3],
- [priorities.High, 4],
- [priorities.VeryHigh, 5]]);
+ [priorities.VeryLow, 1], [priorities.Low, 2], [priorities.Medium, 3], [priorities.High, 4],
+ [priorities.VeryHigh, 5]
+ ]);
}
var value = this._priorityToValue.get(priority);
return value ? `hsla(214, 80%, 50%, ${value / 5})` : null;

Powered by Google App Engine
This is Rietveld 408576698