xpcom/components/nsICategoryManager.idl

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: 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 #include "nsISupports.idl"
     8 interface nsISimpleEnumerator;
    10 /*
    11  * nsICategoryManager
    12  */
    14 [scriptable, uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac)]
    15 interface nsICategoryManager : nsISupports
    16 {
    17     /**
    18      * Get the value for the given category's entry.
    19      * @param aCategory The name of the category ("protocol")
    20      * @param aEntry The entry you're looking for ("http")
    21      * @return The value.
    22      */
    23     string getCategoryEntry(in string aCategory, in string aEntry);
    25     /**
    26      * Add an entry to a category.
    27      * @param aCategory The name of the category ("protocol")
    28      * @param aEntry The entry to be added ("http")
    29      * @param aValue The value for the entry ("moz.httprulez.1")
    30      * @param aPersist Should this data persist between invocations?
    31      * @param aReplace Should we replace an existing entry?
    32      * @return Previous entry, if any
    33      */
    34     string addCategoryEntry(in string aCategory, in string aEntry,
    35 			    in string aValue, in boolean aPersist,
    36 			    in boolean aReplace);
    38     /**
    39      * Delete an entry from the category.
    40      * @param aCategory The name of the category ("protocol")
    41      * @param aEntry The entry to be added ("http")
    42      * @param aPersist Delete persistent data from registry, if present?
    43      */
    44     void deleteCategoryEntry(in string aCategory, in string aEntry,
    45                                in boolean aPersist);
    47     /**
    48      * Delete a category and all entries.
    49      * @param aCategory The category to be deleted.
    50      */
    51     void deleteCategory(in string aCategory);
    53     /**
    54      * Enumerate the entries in a category.
    55      * @param aCategory The category to be enumerated.
    56      * @return a simple enumerator, each result QIs to
    57      *         nsISupportsCString.
    58      */
    59     nsISimpleEnumerator enumerateCategory(in string aCategory);
    61     /**
    62      * Enumerate all existing categories
    63      * @param aCategory The category to be enumerated.
    64      * @return a simple enumerator, each result QIs to
    65      *         nsISupportsCString.
    66      */
    67     nsISimpleEnumerator enumerateCategories();
    68 };

mercurial