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