TRRLoadInfo.h (1819B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef mozilla_TRRLoadInfo_h 8 #define mozilla_TRRLoadInfo_h 9 10 #include "nsILoadInfo.h" 11 #include "nsIURI.h" 12 #include "nsTArray.h" 13 #include "mozilla/dom/ClientInfo.h" 14 #include "mozilla/dom/ServiceWorkerDescriptor.h" 15 #include "mozilla/OriginAttributes.h" 16 17 namespace mozilla { 18 namespace net { 19 20 // TRRLoadInfo is designed to be used by TRRServiceChannel only. Most of 21 // nsILoadInfo functions are not implemented since TRRLoadInfo needs to 22 // support off main thread. 23 class TRRLoadInfo final : public nsILoadInfo { 24 public: 25 NS_DECL_THREADSAFE_ISUPPORTS 26 NS_DECL_NSILOADINFO 27 28 TRRLoadInfo(nsIURI* aResultPrincipalURI, 29 nsContentPolicyType aContentPolicyType); 30 31 already_AddRefed<nsILoadInfo> Clone() const; 32 33 private: 34 virtual ~TRRLoadInfo() = default; 35 36 nsCOMPtr<nsIURI> mResultPrincipalURI; 37 nsContentPolicyType mInternalContentPolicyType; 38 OriginAttributes mOriginAttributes; 39 nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> mEmptyRedirectChain; 40 nsTArray<nsCOMPtr<nsIPrincipal>> mEmptyPrincipals; 41 nsTArray<uint64_t> mEmptyBrowsingContextIDs; 42 nsTArray<nsCString> mCorsUnsafeHeaders; 43 nsID mSandboxedNullPrincipalID; 44 Maybe<mozilla::dom::ClientInfo> mClientInfo; 45 Maybe<mozilla::dom::ClientInfo> mReservedClientInfo; 46 Maybe<mozilla::dom::ClientInfo> mInitialClientInfo; 47 Maybe<mozilla::dom::ServiceWorkerDescriptor> mController; 48 Maybe<RFPTargetSet> mOverriddenFingerprintingSettings; 49 }; 50 51 } // namespace net 52 } // namespace mozilla 53 54 #endif // mozilla_TRRLoadInfo_h