content/xul/templates/src/nsContentTestNode.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 nsContentTestNode_h__
     7 #define nsContentTestNode_h__
     9 #include "mozilla/Attributes.h"
    10 #include "nscore.h"
    11 #include "nsRuleNetwork.h"
    12 #include "nsIAtom.h"
    13 #include "nsIDOMDocument.h"
    15 class nsIXULTemplateBuilder;
    17 /**
    18  * The nsContentTestNode is always the top node in a query's rule network. It
    19  * exists so that Constrain can filter out resources that aren't part of a
    20  * result.
    21  */
    22 class nsContentTestNode : public TestNode
    23 {
    24 public:
    25     nsContentTestNode(nsXULTemplateQueryProcessorRDF* aProcessor,
    26                       nsIAtom* aContentVariable);
    28     virtual nsresult FilterInstantiations(InstantiationSet& aInstantiations,
    29                                           bool* aCantHandleYet) const MOZ_OVERRIDE;
    31     nsresult
    32     Constrain(InstantiationSet& aInstantiations) MOZ_OVERRIDE;
    34     void SetTag(nsIAtom* aTag, nsIDOMDocument* aDocument)
    35     {
    36         mTag = aTag;
    37         mDocument = aDocument;
    38     }
    40 protected:
    41     nsXULTemplateQueryProcessorRDF *mProcessor;
    42     nsIDOMDocument* mDocument;
    43     nsCOMPtr<nsIAtom> mRefVariable;
    44     nsCOMPtr<nsIAtom> mTag;
    45 };
    47 #endif // nsContentTestNode_h__

mercurial