xref: /aosp_15_r20/external/cronet/net/base/request_priority.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2013 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "net/base/request_priority.h"
6 
7 #include "base/notreached.h"
8 
9 namespace net {
10 
RequestPriorityToString(RequestPriority priority)11 const char* RequestPriorityToString(RequestPriority priority) {
12   switch (priority) {
13     case THROTTLED:
14       return "THROTTLED";
15     case IDLE:
16       return "IDLE";
17     case LOWEST:
18       return "LOWEST";
19     case LOW:
20       return "LOW";
21     case MEDIUM:
22       return "MEDIUM";
23     case HIGHEST:
24       return "HIGHEST";
25   }
26   NOTREACHED();
27   return "UNKNOWN_PRIORITY";
28 }
29 
30 }  // namespace net
31