Index: third_party/WebKit/Source/devtools/front_end/network/FilterSuggestionBuilder.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/network/FilterSuggestionBuilder.js b/third_party/WebKit/Source/devtools/front_end/network/FilterSuggestionBuilder.js |
index a3ea2f88fbe51b00dfcfab29793ec9a8047c696e..a3f768ced068784d929f3c979dfa6e2e268a9435 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/network/FilterSuggestionBuilder.js |
+++ b/third_party/WebKit/Source/devtools/front_end/network/FilterSuggestionBuilder.js |
@@ -80,10 +80,19 @@ Network.FilterSuggestionBuilder = class { |
*/ |
_values(key) { |
var result = this._valueLists[key]; |
+ var priorityMap; |
+ |
if (!result) |
return []; |
- result.sort(); |
+ if (key === 'priority') { |
allada
2016/12/17 01:20:20
nit: if (key === Network.NetworkLogView.FilterType
|
+ priorityMap = Network.NetworkDataGridNode.symbolicToNumericPriority; |
allada
2016/12/17 01:20:20
If we change in the other file to send over the ui
Oleksii Kadurin
2016/12/19 22:02:55
What is the point in creating Set here? Double che
|
+ result = result.sort((a, b) => priorityMap.get(b) - priorityMap.get(a)); |
+ result = result.map(priority => Components.uiLabelForPriority(priority)); |
+ } else { |
+ result.sort(); |
+ } |
+ |
return result; |
} |