diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-05-30 12:47:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-30 12:47:56 +0200 |
commit | 9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed (patch) | |
tree | 7512b05f873bcfe8d0f79c34370d0bebad70a07f /dom/base/nsIDocument.h | |
parent | 6e8846622a79549542adaca58d741d9263daf686 (diff) | |
parent | bd851735628cd6b07285e87fa60081e9d11a3b7e (diff) | |
download | UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar.gz UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar.lz UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar.xz UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.zip |
Merge pull request #412 from g4jc/hsts_priming_removal_backport
Remove support and tests for HSTS priming from the tree. Fixes #384
Diffstat (limited to 'dom/base/nsIDocument.h')
-rw-r--r-- | dom/base/nsIDocument.h | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/dom/base/nsIDocument.h b/dom/base/nsIDocument.h index 1e0c9562e..7a73fae71 100644 --- a/dom/base/nsIDocument.h +++ b/dom/base/nsIDocument.h @@ -18,11 +18,11 @@ #include "nsINode.h" // for base class #include "nsIScriptGlobalObject.h" // for member (in nsCOMPtr) #include "nsIServiceManager.h" +#include "nsIURI.h" // for use in inline functions #include "nsIUUIDGenerator.h" #include "nsPIDOMWindow.h" // for use in inline functions #include "nsPropertyTable.h" // for member -#include "nsDataHashtable.h" // for member -#include "nsURIHashKey.h" // for member +#include "nsTHashtable.h" // for member #include "mozilla/net/ReferrerPolicy.h" // for member #include "nsWeakReference.h" #include "mozilla/UseCounter.h" @@ -182,13 +182,6 @@ enum DocumentFlavor { DocumentFlavorPlain, // Just a Document }; -// Enum for HSTS priming states -enum class HSTSPrimingState { - eNO_HSTS_PRIMING = 0, // don't do HSTS Priming - eHSTS_PRIMING_ALLOW = 1, // if HSTS priming fails, allow the load to proceed - eHSTS_PRIMING_BLOCK = 2 // if HSTS priming fails, block the load -}; - // Document states // RTL locale: specific to the XUL localedir attribute @@ -406,34 +399,6 @@ public: } /** - * Check to see if a subresource we want to load requires HSTS priming - * to be done. - */ - HSTSPrimingState GetHSTSPrimingStateForLocation(nsIURI* aContentLocation) const - { - HSTSPrimingState state; - if (mHSTSPrimingURIList.Get(aContentLocation, &state)) { - return state; - } - return HSTSPrimingState::eNO_HSTS_PRIMING; - } - - /** - * Add a subresource to the HSTS priming list. If this URI is - * not in the HSTS cache, it will trigger an HSTS priming request - * when we try to load it. - */ - void AddHSTSPrimingLocation(nsIURI* aContentLocation, HSTSPrimingState aState) - { - mHSTSPrimingURIList.Put(aContentLocation, aState); - } - - void ClearHSTSPrimingLocation(nsIURI* aContentLocation) - { - mHSTSPrimingURIList.Remove(aContentLocation); - } - - /** * Set the principal responsible for this document. */ virtual void SetPrincipal(nsIPrincipal *aPrincipal) = 0; @@ -2987,11 +2952,6 @@ protected: bool mUpgradeInsecureRequests; bool mUpgradeInsecurePreloads; - // if nsMixedContentBlocker requires sending an HSTS priming request, - // temporarily store that in the document so that it can be propogated to the - // LoadInfo and eventually the HTTP Channel - nsDataHashtable<nsURIHashKey, HSTSPrimingState> mHSTSPrimingURIList; - mozilla::WeakPtr<nsDocShell> mDocumentContainer; nsCString mCharacterSet; |