summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/Http3Stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/protocol/http/Http3Stream.cpp')
-rw-r--r--netwerk/protocol/http/Http3Stream.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/netwerk/protocol/http/Http3Stream.cpp b/netwerk/protocol/http/Http3Stream.cpp
index 4f33ca07e2..4bb6b30925 100644
--- a/netwerk/protocol/http/Http3Stream.cpp
+++ b/netwerk/protocol/http/Http3Stream.cpp
@@ -42,7 +42,7 @@ Http3Stream::Http3Stream(nsAHttpTransaction* httpTransaction,
mTransactionBrowserId = trans->BrowserId();
}
- SetPriority(cos.Flags());
+ mPriorityUrgency = nsHttpHandler::UrgencyFromCoSFlags(cos.Flags());
SetIncremental(cos.Incremental());
}
@@ -80,31 +80,6 @@ bool Http3Stream::GetHeadersString(const char* buf, uint32_t avail,
return true;
}
-void Http3Stream::SetPriority(uint32_t aCos) {
- if (aCos & nsIClassOfService::UrgentStart) {
- // coming from an user interaction => response should be the highest
- // priority
- mPriorityUrgency = 1;
- } else if (aCos & nsIClassOfService::Leader) {
- // main html document normal priority
- mPriorityUrgency = 2;
- } else if (aCos & nsIClassOfService::Unblocked) {
- mPriorityUrgency = 3;
- } else if (aCos & nsIClassOfService::Follower) {
- mPriorityUrgency = 4;
- } else if (aCos & nsIClassOfService::Speculative) {
- mPriorityUrgency = 6;
- } else if (aCos & nsIClassOfService::Background) {
- // background tasks can be deprioritzed to the lowest priority
- mPriorityUrgency = 6;
- } else if (aCos & nsIClassOfService::Tail) {
- mPriorityUrgency = 6;
- } else {
- // all others get a lower priority than the main html document
- mPriorityUrgency = 4;
- }
-}
-
void Http3Stream::SetIncremental(bool incremental) {
mPriorityIncremental = incremental;
}