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/. */
7 #ifndef mozilla_TRRLoadInfo_h
8 #define mozilla_TRRLoadInfo_h
10 #include "nsILoadInfo.h"
13 #include "mozilla/dom/ClientInfo.h"
14 #include "mozilla/dom/ServiceWorkerDescriptor.h"
15 #include "mozilla/OriginAttributes.h"
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
{
25 NS_DECL_THREADSAFE_ISUPPORTS
28 TRRLoadInfo(nsIURI
* aResultPrincipalURI
,
29 nsContentPolicyType aContentPolicyType
);
31 already_AddRefed
<nsILoadInfo
> Clone() const;
34 virtual ~TRRLoadInfo() = default;
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
<RFPTarget
> mOverriddenFingerprintingSettings
;
52 } // namespace mozilla
54 #endif // mozilla_TRRLoadInfo_h