From 7f3ac3954b4db4129d31aef3ee5c98a70fc0b1dd Mon Sep 17 00:00:00 2001 From: somdatta Date: Thu, 28 Oct 2021 11:07:55 +0000 Subject: [PATCH] Bug 271386- Make some functions private in nsHttpResponseHead r=necko-reviewers,kershaw Make the following functions private because they are only used in nsHttpResponseHead.cpp for compiler optimization- GetDateValue,GetAgeValue,GetMaxAgeValue,GetExpiresValue. GetLastModifiedValue cannot be made private since it is being used in CachePushChecker.cpp and ParseDateHeader is already private. Differential Revision: https://phabricator.services.mozilla.com/D129664 --- netwerk/protocol/http/nsHttpResponseHead.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/netwerk/protocol/http/nsHttpResponseHead.h b/netwerk/protocol/http/nsHttpResponseHead.h index 88df3f080753..85327045a308 100644 --- a/netwerk/protocol/http/nsHttpResponseHead.h +++ b/netwerk/protocol/http/nsHttpResponseHead.h @@ -126,11 +126,6 @@ class nsHttpResponseHead { // reset the response head to it's initial state void Reset(); - [[nodiscard]] nsresult GetAgeValue(uint32_t* result); - [[nodiscard]] nsresult GetMaxAgeValue(uint32_t* result); - [[nodiscard]] nsresult GetStaleWhileRevalidateValue(uint32_t* result); - [[nodiscard]] nsresult GetDateValue(uint32_t* result); - [[nodiscard]] nsresult GetExpiresValue(uint32_t* result); [[nodiscard]] nsresult GetLastModifiedValue(uint32_t* result); bool operator==(const nsHttpResponseHead& aOther) const; @@ -162,6 +157,11 @@ class nsHttpResponseHead { // these return failure if the header does not exist. [[nodiscard]] nsresult ParseDateHeader(const nsHttpAtom& header, uint32_t* result) const; + [[nodiscard]] nsresult GetAgeValue(uint32_t* result); + [[nodiscard]] nsresult GetMaxAgeValue(uint32_t* result); + [[nodiscard]] nsresult GetStaleWhileRevalidateValue(uint32_t* result); + [[nodiscard]] nsresult GetDateValue(uint32_t* result); + [[nodiscard]] nsresult GetExpiresValue(uint32_t* result); bool ExpiresInPast_locked() const; [[nodiscard]] nsresult GetAgeValue_locked(uint32_t* result) const;