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.

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

mercurial