Bug 1904139 - Don't re-initialize platform font list from GetDefaultFont. r=jfkthame
[gecko.git] / netwerk / base / InterceptionInfo.h
blobad2f2a449902bd8fd6f167db4776085ed99c43ce
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_net_InterceptionInfo_h
8 #define mozilla_net_InterceptionInfo_h
10 #include "nsIContentSecurityPolicy.h"
11 #include "nsIInterceptionInfo.h"
12 #include "nsIPrincipal.h"
13 #include "nsIRedirectHistoryEntry.h"
14 #include "nsTArray.h"
15 #include "nsCOMPtr.h"
17 namespace mozilla::net {
19 using RedirectHistoryArray = nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>>;
21 class InterceptionInfo final : public nsIInterceptionInfo {
22 public:
23 NS_DECL_THREADSAFE_ISUPPORTS
24 NS_DECL_NSIINTERCEPTIONINFO
26 InterceptionInfo(nsIPrincipal* aTriggeringPrincipal,
27 nsContentPolicyType aContentPolicyType,
28 const RedirectHistoryArray& aRedirectChain,
29 bool aFromThirdParty);
31 using nsIInterceptionInfo::GetExtContentPolicyType;
33 private:
34 ~InterceptionInfo() = default;
36 nsCOMPtr<nsIPrincipal> mTriggeringPrincipal;
37 nsContentPolicyType mContentPolicyType{nsIContentPolicy::TYPE_INVALID};
38 RedirectHistoryArray mRedirectChain;
39 bool mFromThirdParty = false;
42 } // namespace mozilla::net
44 #endif