This source file includes following definitions.
- ConvertRequestPriorityToQuicPriority
- ConvertQuicPriorityToRequestPriority
- QuicRequestNetLogCallback
#include "net/quic/quic_http_utils.h"
namespace net {
QuicPriority ConvertRequestPriorityToQuicPriority(
const RequestPriority priority) {
DCHECK_GE(priority, MINIMUM_PRIORITY);
DCHECK_LE(priority, MAXIMUM_PRIORITY);
return static_cast<QuicPriority>(HIGHEST - priority);
}
NET_EXPORT_PRIVATE RequestPriority ConvertQuicPriorityToRequestPriority(
QuicPriority priority) {
return (priority >= 5) ?
IDLE : static_cast<RequestPriority>(HIGHEST - priority);
}
base::Value* QuicRequestNetLogCallback(
const SpdyHeaderBlock* headers,
QuicPriority priority,
NetLog::LogLevel log_level) {
base::DictionaryValue* dict = static_cast<base::DictionaryValue*>(
SpdyHeaderBlockNetLogCallback(headers, log_level));
dict->SetInteger("quic_priority", static_cast<int>(priority));
return dict;
}
}