caps/include/DomainPolicy.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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"
    14 namespace mozilla {
    16 class DomainPolicy : public nsIDomainPolicy
    17 {
    18 public:
    19     NS_DECL_ISUPPORTS
    20     NS_DECL_NSIDOMAINPOLICY
    21     DomainPolicy();
    22     virtual ~DomainPolicy();
    24 private:
    25     nsCOMPtr<nsIDomainSet> mBlacklist;
    26     nsCOMPtr<nsIDomainSet> mSuperBlacklist;
    27     nsCOMPtr<nsIDomainSet> mWhitelist;
    28     nsCOMPtr<nsIDomainSet> mSuperWhitelist;
    29 };
    31 class DomainSet : public nsIDomainSet
    32 {
    33 public:
    34     NS_DECL_ISUPPORTS
    35     NS_DECL_NSIDOMAINSET
    37     DomainSet() {}
    38     virtual ~DomainSet() {}
    40 protected:
    41     nsTHashtable<nsURIHashKey> mHashTable;
    42 };
    44 } /* namespace mozilla */
    46 #endif /* DomainPolicy_h__ */

mercurial