content/xul/templates/src/nsXULTemplateResultXML.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 nsXULTemplateResultXML_h__
     7 #define nsXULTemplateResultXML_h__
     9 #include "nsCOMPtr.h"
    10 #include "nsIURI.h"
    11 #include "nsIRDFResource.h"
    12 #include "nsXULTemplateQueryProcessorXML.h"
    13 #include "nsIXULTemplateResult.h"
    14 #include "mozilla/Attributes.h"
    16 /**
    17  * An single result of an query
    18  */
    19 class nsXULTemplateResultXML MOZ_FINAL : public nsIXULTemplateResult
    20 {
    21 public:
    22     NS_DECL_ISUPPORTS
    24     NS_DECL_NSIXULTEMPLATERESULT
    26     nsXULTemplateResultXML(nsXMLQuery* aQuery,
    27                            nsIDOMNode* aNode,
    28                            nsXMLBindingSet* aBindings);
    30     ~nsXULTemplateResultXML() {}
    32     void GetNode(nsIDOMNode** aNode);
    34 protected:
    36     // ID used for persisting data. It is constructed using the mNode's
    37     // base uri plus the node's id to form 'baseuri#id'. If the node has no
    38     // id, then an id of the form 'row<some number>' is generated. In the
    39     // latter case, persistence will not work as there won't be a unique id.
    40     nsAutoString mId;
    42     // query that generated the result
    43     nsCOMPtr<nsXMLQuery> mQuery;
    45     // context node in datasource
    46     nsCOMPtr<nsIDOMNode> mNode;
    48     // assignments in query
    49     nsXMLBindingValues mRequiredValues;
    51     // extra assignments made by rules (<binding> tags)
    52     nsXMLBindingValues mOptionalValues;
    53 };
    55 #endif // nsXULTemplateResultXML_h__

mercurial