1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim: set ts=8 sts=4 et sw=4 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 DomainPolicy_h__
8 #define DomainPolicy_h__
10 #include "nsIDomainPolicy.h"
11 #include "nsTHashtable.h"
12 #include "nsURIHashKey.h"
20 enum DomainSetChangeType
{
36 class DomainSet final
: public nsIDomainSet
42 explicit DomainSet(DomainSetType aType
)
46 void CloneSet(InfallibleTArray
<mozilla::ipc::URIParams
>* aDomains
);
49 virtual ~DomainSet() {}
50 nsTHashtable
<nsURIHashKey
> mHashTable
;
54 class DomainPolicy final
: public nsIDomainPolicy
58 NS_DECL_NSIDOMAINPOLICY
62 virtual ~DomainPolicy();
64 RefPtr
<DomainSet
> mBlacklist
;
65 RefPtr
<DomainSet
> mSuperBlacklist
;
66 RefPtr
<DomainSet
> mWhitelist
;
67 RefPtr
<DomainSet
> mSuperWhitelist
;
70 } /* namespace mozilla */
72 #endif /* DomainPolicy_h__ */