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..ed72af990827c9a59804832854dcc2d303ce087e 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/12 17:29:57
Instead of storing the symbols lets just make sure
Oleksii Kadurin
2016/12/12 21:13:15
It could be optimized but I don't feel it could be
allada
2016/12/12 23:51:08
Lets first address the two way map from the other
Oleksii Kadurin
2016/12/13 19:43:37
Sorry, I still don't get the idea here :(
I will j
|
+ priorityMap = SDK.NetworkRequest.GetSymbolicToNumericPriority(); |
+ result = result.sort((a, b) => priorityMap.get(b) - priorityMap.get(a)); |
+ result = result.map(priority => Components.uiLabelForPriority(priority)); |
+ } else { |
+ result.sort(); |
+ } |
+ |
return result; |
} |