diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:02:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:02:43 +0000 |
commit | 8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd (patch) | |
tree | 16a27151176f80644677f4007d17dbd5f4d0f204 /docshell | |
parent | Releasing progress-linux version 127.0-1~progress7.99u1. (diff) | |
download | firefox-8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd.tar.xz firefox-8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd.zip |
Merging upstream version 127.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/base/nsDocShellLoadState.cpp | 12 | ||||
-rw-r--r-- | docshell/base/nsDocShellLoadState.h | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/docshell/base/nsDocShellLoadState.cpp b/docshell/base/nsDocShellLoadState.cpp index b3812eedd3..30ffed97d0 100644 --- a/docshell/base/nsDocShellLoadState.cpp +++ b/docshell/base/nsDocShellLoadState.cpp @@ -24,6 +24,7 @@ #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/LoadURIOptionsBinding.h" +#include "mozilla/dom/nsHTTPSOnlyUtils.h" #include "mozilla/StaticPrefs_browser.h" #include "mozilla/StaticPrefs_fission.h" #include "mozilla/Telemetry.h" @@ -165,6 +166,7 @@ nsDocShellLoadState::nsDocShellLoadState(const nsDocShellLoadState& aOther) mPartitionedPrincipalToInherit(aOther.mPartitionedPrincipalToInherit), mForceAllowDataURI(aOther.mForceAllowDataURI), mIsExemptFromHTTPSFirstMode(aOther.mIsExemptFromHTTPSFirstMode), + mHttpsFirstDowngradeData(aOther.GetHttpsFirstDowngradeData()), mOriginalFrameSrc(aOther.mOriginalFrameSrc), mIsFormSubmission(aOther.mIsFormSubmission), mLoadType(aOther.mLoadType), @@ -632,6 +634,16 @@ void nsDocShellLoadState::SetIsExemptFromHTTPSFirstMode( mIsExemptFromHTTPSFirstMode = aIsExemptFromHTTPSFirstMode; } +RefPtr<HTTPSFirstDowngradeData> +nsDocShellLoadState::GetHttpsFirstDowngradeData() const { + return mHttpsFirstDowngradeData; +} + +void nsDocShellLoadState::SetHttpsFirstDowngradeData( + RefPtr<HTTPSFirstDowngradeData> const& aHttpsFirstTelemetryData) { + mHttpsFirstDowngradeData = aHttpsFirstTelemetryData; +} + bool nsDocShellLoadState::OriginalFrameSrc() const { return mOriginalFrameSrc; } void nsDocShellLoadState::SetOriginalFrameSrc(bool aOriginalFrameSrc) { diff --git a/docshell/base/nsDocShellLoadState.h b/docshell/base/nsDocShellLoadState.h index 8a8aad5a2c..8b1c430128 100644 --- a/docshell/base/nsDocShellLoadState.h +++ b/docshell/base/nsDocShellLoadState.h @@ -24,6 +24,7 @@ class nsIURI; class nsIDocShell; class nsIChannel; class nsIReferrerInfo; +struct HTTPSFirstDowngradeData; namespace mozilla { class OriginAttributes; template <typename, class> @@ -148,6 +149,11 @@ class nsDocShellLoadState final { void SetIsExemptFromHTTPSFirstMode(bool aIsExemptFromHTTPSFirstMode); + RefPtr<HTTPSFirstDowngradeData> GetHttpsFirstDowngradeData() const; + + void SetHttpsFirstDowngradeData( + RefPtr<HTTPSFirstDowngradeData> const& aHttpsFirstTelemetryData); + bool OriginalFrameSrc() const; void SetOriginalFrameSrc(bool aOriginalFrameSrc); @@ -484,6 +490,10 @@ class nsDocShellLoadState final { // will be exempt from HTTPS-Only-Mode upgrades. bool mIsExemptFromHTTPSFirstMode; + // If set, this load is a HTTPS-First downgrade, and the downgrade data will + // be submitted to telemetry later if the load succeeds. + RefPtr<HTTPSFirstDowngradeData> mHttpsFirstDowngradeData; + // If this attribute is true, this load corresponds to a frame // element loading its original src (or srcdoc) attribute. bool mOriginalFrameSrc; |