content/xul/templates/src/nsRDFTestNode.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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsRDFTestNode_h__
     7 #define nsRDFTestNode_h__
     9 #include "nsRuleNetwork.h"
    11 class nsIRDFResource;
    12 class nsIRDFNode;
    14 /**
    15  * An abstract base class for all of the RDF-related tests. This interface
    16  * allows us to iterate over all of the RDF tests to find the one in the
    17  * network that is apropos for a newly-added assertion.
    18  */
    19 class nsRDFTestNode : public TestNode
    20 {
    21 public:
    22     nsRDFTestNode(TestNode* aParent)
    23         : TestNode(aParent) {}
    25     /**
    26      * Determine whether the node can propagate an assertion
    27      * with the specified source, property, and target. If the
    28      * assertion can be propagated, aInitialBindings will be
    29      * initialized with appropriate variable-to-value assignments
    30      * to allow the rule network to start a constrain and propagate
    31      * search from this node in the network.
    32      *
    33      * @return true if the node can propagate the specified
    34      * assertion.
    35      */
    36     virtual bool CanPropagate(nsIRDFResource* aSource,
    37                                 nsIRDFResource* aProperty,
    38                                 nsIRDFNode* aTarget,
    39                                 Instantiation& aInitialBindings) const = 0;
    41     /**
    42      *
    43      */
    44     virtual void Retract(nsIRDFResource* aSource,
    45                          nsIRDFResource* aProperty,
    46                          nsIRDFNode* aTarget) const = 0;
    47 };
    49 #endif // nsRDFTestNode_h__

mercurial