1 // Copyright (c) 2012 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.
5 #ifndef NET_BASE_REQUEST_PRIORITY_H_
6 #define NET_BASE_REQUEST_PRIORITY_H_
10 // Prioritization used in various parts of the networking code such
11 // as connection prioritization and resource loading prioritization.
12 enum RequestPriority {
14 MINIMUM_PRIORITY = IDLE,
16 DEFAULT_PRIORITY = LOWEST,
20 MAXIMUM_PRIORITY = HIGHEST,
23 // For simplicity, one can assume that one can index into array of
24 // NUM_PRIORITIES elements with a RequestPriority (i.e.,
25 // MINIMUM_PRIORITY == 0).
26 enum RequestPrioritySize {
27 NUM_PRIORITIES = MAXIMUM_PRIORITY + 1,
30 const char* RequestPriorityToString(RequestPriority priority);
34 #endif // NET_BASE_REQUEST_PRIORITY_H_