editor/txmgr/src/nsTransactionList.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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 nsTransactionList_h__
     7 #define nsTransactionList_h__
     9 #include "nsAutoPtr.h"
    10 #include "nsISupportsImpl.h"
    11 #include "nsITransactionList.h"
    12 #include "nsIWeakReferenceUtils.h"
    14 class nsITransaction;
    15 class nsITransactionManager;
    16 class nsTransactionItem;
    17 class nsTransactionStack;
    19 /** implementation of a transaction list object.
    20  *
    21  */
    22 class nsTransactionList : public nsITransactionList
    23 {
    24 private:
    26   nsWeakPtr                   mTxnMgr;
    27   nsTransactionStack         *mTxnStack;
    28   nsRefPtr<nsTransactionItem> mTxnItem;
    30 public:
    32   nsTransactionList(nsITransactionManager *aTxnMgr, nsTransactionStack *aTxnStack);
    33   nsTransactionList(nsITransactionManager *aTxnMgr, nsTransactionItem *aTxnItem);
    35   virtual ~nsTransactionList();
    37   /* Macro for AddRef(), Release(), and QueryInterface() */
    38   NS_DECL_ISUPPORTS
    40   /* nsITransactionManager method implementations. */
    41   NS_DECL_NSITRANSACTIONLIST
    43   /* nsTransactionList specific methods. */
    44 };
    46 #endif // nsTransactionList_h__

mercurial