| OLD | NEW |
| (Empty) | |
| 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/quic/quic_http_utils.h" |
| 6 |
| 7 namespace net { |
| 8 |
| 9 QuicPriority ConvertRequestPriorityToQuicPriority( |
| 10 const RequestPriority priority) { |
| 11 DCHECK_GE(priority, MINIMUM_PRIORITY); |
| 12 DCHECK_LT(priority, NUM_PRIORITIES); |
| 13 return static_cast<QuicPriority>(HIGHEST - priority); |
| 14 } |
| 15 |
| 16 NET_EXPORT_PRIVATE RequestPriority ConvertQuicPriorityToRequestPriority( |
| 17 QuicPriority priority) { |
| 18 // Handle invalid values gracefully. |
| 19 return (priority >= 5) ? |
| 20 IDLE : static_cast<RequestPriority>(HIGHEST - priority); |
| 21 } |
| 22 |
| 23 } // namespace net |
| OLD | NEW |