caps/include/DomainPolicy.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* vim: set ts=8 sts=4 et sw=4 tw=80: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef DomainPolicy_h__
michael@0 8 #define DomainPolicy_h__
michael@0 9
michael@0 10 #include "nsIDomainPolicy.h"
michael@0 11 #include "nsTHashtable.h"
michael@0 12 #include "nsURIHashKey.h"
michael@0 13
michael@0 14 namespace mozilla {
michael@0 15
michael@0 16 class DomainPolicy : public nsIDomainPolicy
michael@0 17 {
michael@0 18 public:
michael@0 19 NS_DECL_ISUPPORTS
michael@0 20 NS_DECL_NSIDOMAINPOLICY
michael@0 21 DomainPolicy();
michael@0 22 virtual ~DomainPolicy();
michael@0 23
michael@0 24 private:
michael@0 25 nsCOMPtr<nsIDomainSet> mBlacklist;
michael@0 26 nsCOMPtr<nsIDomainSet> mSuperBlacklist;
michael@0 27 nsCOMPtr<nsIDomainSet> mWhitelist;
michael@0 28 nsCOMPtr<nsIDomainSet> mSuperWhitelist;
michael@0 29 };
michael@0 30
michael@0 31 class DomainSet : public nsIDomainSet
michael@0 32 {
michael@0 33 public:
michael@0 34 NS_DECL_ISUPPORTS
michael@0 35 NS_DECL_NSIDOMAINSET
michael@0 36
michael@0 37 DomainSet() {}
michael@0 38 virtual ~DomainSet() {}
michael@0 39
michael@0 40 protected:
michael@0 41 nsTHashtable<nsURIHashKey> mHashTable;
michael@0 42 };
michael@0 43
michael@0 44 } /* namespace mozilla */
michael@0 45
michael@0 46 #endif /* DomainPolicy_h__ */

mercurial