1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
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