Bug 1545423 - P2 web request data API implementation r=mixedpuppy

Differential Revision: https://phabricator.services.mozilla.com/D50405
This commit is contained in:
Junior Hsu
2019-10-31 00:50:47 +00:00
parent f145a5ed1b
commit 56a167e6b6
5 changed files with 41 additions and 1 deletions

View File

@@ -825,6 +825,22 @@ void ChannelWrapper::GetStatusLine(nsCString& aRetVal) const {
}
}
uint64_t ChannelWrapper::ResponseSize() const {
uint64_t result = 0;
if (nsCOMPtr<nsIHttpChannel> chan = MaybeHttpChannel()) {
Unused << chan->GetTransferSize(&result);
}
return result;
}
uint64_t ChannelWrapper::RequestSize() const {
uint64_t result = 0;
if (nsCOMPtr<nsIHttpChannel> chan = MaybeHttpChannel()) {
Unused << chan->GetRequestSize(&result);
}
return result;
}
/*****************************************************************************
* ...
*****************************************************************************/