request_priority.cc 653 B

123456789101112131415161718192021222324252627282930
  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. #include "net/base/request_priority.h"
  5. #include "base/notreached.h"
  6. namespace net {
  7. const char* RequestPriorityToString(RequestPriority priority) {
  8. switch (priority) {
  9. case THROTTLED:
  10. return "THROTTLED";
  11. case IDLE:
  12. return "IDLE";
  13. case LOWEST:
  14. return "LOWEST";
  15. case LOW:
  16. return "LOW";
  17. case MEDIUM:
  18. return "MEDIUM";
  19. case HIGHEST:
  20. return "HIGHEST";
  21. }
  22. NOTREACHED();
  23. return "UNKNOWN_PRIORITY";
  24. }
  25. } // namespace net