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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js

Issue 2450973002: [DevTools] Inherit WI.Target from Protocol.Target. (Closed)
Patch Set: Created 4 years, 2 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/components/NetworkConditionsSelector.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js b/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js
index a33725b139ef81fbb45957a92cac1df4415f21c2..1a5c771d7f87ce5b48c49eb6f796d7509e22134c 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js
@@ -498,3 +498,23 @@ WebInspector.NetworkConditionsActionDelegate.prototype = {
return false;
}
};
+
+/**
+ * @param {?NetworkAgent.ResourcePriority} priority
+ * @return {string}
+ */
+WebInspector.uiLabelForPriority = function(priority)
+{
+ var labelMap = WebInspector.uiLabelForPriority._priorityToUILabel;
+ if (!labelMap) {
+ labelMap = new Map([
+ [NetworkAgent.ResourcePriority.VeryLow, WebInspector.UIString("Lowest")],
+ [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")],
+ [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium")],
+ [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")],
+ [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("Highest")]
+ ]);
+ WebInspector.uiLabelForPriority._priorityToUILabel = labelMap;
+ }
+ return labelMap.get(priority) || WebInspector.UIString("Unknown");
+};

Powered by Google App Engine
This is Rietveld 408576698