|
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/. */ |
|
6 |
|
7 #ifndef DomainPolicy_h__ |
|
8 #define DomainPolicy_h__ |
|
9 |
|
10 #include "nsIDomainPolicy.h" |
|
11 #include "nsTHashtable.h" |
|
12 #include "nsURIHashKey.h" |
|
13 |
|
14 namespace mozilla { |
|
15 |
|
16 class DomainPolicy : public nsIDomainPolicy |
|
17 { |
|
18 public: |
|
19 NS_DECL_ISUPPORTS |
|
20 NS_DECL_NSIDOMAINPOLICY |
|
21 DomainPolicy(); |
|
22 virtual ~DomainPolicy(); |
|
23 |
|
24 private: |
|
25 nsCOMPtr<nsIDomainSet> mBlacklist; |
|
26 nsCOMPtr<nsIDomainSet> mSuperBlacklist; |
|
27 nsCOMPtr<nsIDomainSet> mWhitelist; |
|
28 nsCOMPtr<nsIDomainSet> mSuperWhitelist; |
|
29 }; |
|
30 |
|
31 class DomainSet : public nsIDomainSet |
|
32 { |
|
33 public: |
|
34 NS_DECL_ISUPPORTS |
|
35 NS_DECL_NSIDOMAINSET |
|
36 |
|
37 DomainSet() {} |
|
38 virtual ~DomainSet() {} |
|
39 |
|
40 protected: |
|
41 nsTHashtable<nsURIHashKey> mHashTable; |
|
42 }; |
|
43 |
|
44 } /* namespace mozilla */ |
|
45 |
|
46 #endif /* DomainPolicy_h__ */ |