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 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | /** |
michael@0 | 6 | * The nsIComponentRegistrar interface. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsISupports.idl" |
michael@0 | 10 | |
michael@0 | 11 | interface nsIFile; |
michael@0 | 12 | interface nsIFactory; |
michael@0 | 13 | interface nsISimpleEnumerator; |
michael@0 | 14 | |
michael@0 | 15 | [scriptable, uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)] |
michael@0 | 16 | interface nsIComponentRegistrar : nsISupports |
michael@0 | 17 | { |
michael@0 | 18 | /** |
michael@0 | 19 | * autoRegister |
michael@0 | 20 | * |
michael@0 | 21 | * Register a .manifest file, or an entire directory containing |
michael@0 | 22 | * these files. Registration lasts for this run only, and is not cached. |
michael@0 | 23 | * |
michael@0 | 24 | * @note Formerly this method would register component files directly. This |
michael@0 | 25 | * is no longer supported. |
michael@0 | 26 | */ |
michael@0 | 27 | void autoRegister(in nsIFile aSpec); |
michael@0 | 28 | |
michael@0 | 29 | /** |
michael@0 | 30 | * autoUnregister |
michael@0 | 31 | * @status OBSOLETE: This method is no longer implemented, but preserved |
michael@0 | 32 | * in this interface for binary compatibility with |
michael@0 | 33 | * Mozilla 1.9.2. |
michael@0 | 34 | */ |
michael@0 | 35 | void autoUnregister(in nsIFile aSpec); |
michael@0 | 36 | |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * registerFactory |
michael@0 | 40 | * |
michael@0 | 41 | * Register a factory with a given ContractID, CID and Class Name. |
michael@0 | 42 | * |
michael@0 | 43 | * @param aClass : CID of object |
michael@0 | 44 | * @param aClassName : Class Name of CID (unused) |
michael@0 | 45 | * @param aContractID : ContractID associated with CID aClass. May be null |
michael@0 | 46 | * if no contract ID is needed. |
michael@0 | 47 | * @param aFactory : Factory that will be registered for CID aClass. |
michael@0 | 48 | * If aFactory is null, the contract will be associated |
michael@0 | 49 | * with a previously registered CID. |
michael@0 | 50 | */ |
michael@0 | 51 | void registerFactory(in nsCIDRef aClass, |
michael@0 | 52 | in string aClassName, |
michael@0 | 53 | in string aContractID, |
michael@0 | 54 | in nsIFactory aFactory); |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * unregisterFactory |
michael@0 | 58 | * |
michael@0 | 59 | * Unregister a factory associated with CID aClass. |
michael@0 | 60 | * |
michael@0 | 61 | * @param aClass : CID being unregistered |
michael@0 | 62 | * @param aFactory : Factory previously registered to create instances of |
michael@0 | 63 | * CID aClass. |
michael@0 | 64 | * |
michael@0 | 65 | * @throws NS_ERROR* Method failure. |
michael@0 | 66 | */ |
michael@0 | 67 | void unregisterFactory(in nsCIDRef aClass, |
michael@0 | 68 | in nsIFactory aFactory); |
michael@0 | 69 | |
michael@0 | 70 | /** |
michael@0 | 71 | * registerFactoryLocation |
michael@0 | 72 | * @status OBSOLETE: This method is no longer implemented, but preserved |
michael@0 | 73 | * in this interface for binary compatibility with |
michael@0 | 74 | * Mozilla 1.9.2. |
michael@0 | 75 | */ |
michael@0 | 76 | void registerFactoryLocation(in nsCIDRef aClass, |
michael@0 | 77 | in string aClassName, |
michael@0 | 78 | in string aContractID, |
michael@0 | 79 | in nsIFile aFile, |
michael@0 | 80 | in string aLoaderStr, |
michael@0 | 81 | in string aType); |
michael@0 | 82 | |
michael@0 | 83 | /** |
michael@0 | 84 | * unregisterFactoryLocation |
michael@0 | 85 | * @status OBSOLETE: This method is no longer implemented, but preserved |
michael@0 | 86 | * in this interface for binary compatibility with |
michael@0 | 87 | * Mozilla 1.9.2. |
michael@0 | 88 | */ |
michael@0 | 89 | void unregisterFactoryLocation(in nsCIDRef aClass, |
michael@0 | 90 | in nsIFile aFile); |
michael@0 | 91 | |
michael@0 | 92 | /** |
michael@0 | 93 | * isCIDRegistered |
michael@0 | 94 | * |
michael@0 | 95 | * Returns true if a factory is registered for the CID. |
michael@0 | 96 | * |
michael@0 | 97 | * @param aClass : CID queried for registeration |
michael@0 | 98 | * @return : true if a factory is registered for CID |
michael@0 | 99 | * false otherwise. |
michael@0 | 100 | */ |
michael@0 | 101 | boolean isCIDRegistered(in nsCIDRef aClass); |
michael@0 | 102 | |
michael@0 | 103 | /** |
michael@0 | 104 | * isContractIDRegistered |
michael@0 | 105 | * |
michael@0 | 106 | * Returns true if a factory is registered for the contract id. |
michael@0 | 107 | * |
michael@0 | 108 | * @param aClass : contract id queried for registeration |
michael@0 | 109 | * @return : true if a factory is registered for contract id |
michael@0 | 110 | * false otherwise. |
michael@0 | 111 | */ |
michael@0 | 112 | boolean isContractIDRegistered(in string aContractID); |
michael@0 | 113 | |
michael@0 | 114 | /** |
michael@0 | 115 | * enumerateCIDs |
michael@0 | 116 | * |
michael@0 | 117 | * Enumerate the list of all registered CIDs. |
michael@0 | 118 | * |
michael@0 | 119 | * @return : enumerator for CIDs. Elements of the enumeration can be QI'ed |
michael@0 | 120 | * for the nsISupportsID interface. From the nsISupportsID, you |
michael@0 | 121 | * can obtain the actual CID. |
michael@0 | 122 | */ |
michael@0 | 123 | nsISimpleEnumerator enumerateCIDs(); |
michael@0 | 124 | |
michael@0 | 125 | /** |
michael@0 | 126 | * enumerateContractIDs |
michael@0 | 127 | * |
michael@0 | 128 | * Enumerate the list of all registered ContractIDs. |
michael@0 | 129 | * |
michael@0 | 130 | * @return : enumerator for ContractIDs. Elements of the enumeration can be |
michael@0 | 131 | * QI'ed for the nsISupportsCString interface. From the |
michael@0 | 132 | * nsISupportsCString interface, you can obtain the actual |
michael@0 | 133 | * Contract ID string. |
michael@0 | 134 | */ |
michael@0 | 135 | nsISimpleEnumerator enumerateContractIDs(); |
michael@0 | 136 | |
michael@0 | 137 | /** |
michael@0 | 138 | * CIDToContractID |
michael@0 | 139 | * @status OBSOLETE: This method is no longer implemented, but preserved |
michael@0 | 140 | * in this interface for binary compatibility with |
michael@0 | 141 | * Mozilla 1.9.2. |
michael@0 | 142 | */ |
michael@0 | 143 | string CIDToContractID(in nsCIDRef aClass); |
michael@0 | 144 | |
michael@0 | 145 | /** |
michael@0 | 146 | * contractIDToCID |
michael@0 | 147 | * |
michael@0 | 148 | * Returns the CID for a given Contract ID, if one exists and is registered. |
michael@0 | 149 | * |
michael@0 | 150 | * @return : Contract ID. |
michael@0 | 151 | */ |
michael@0 | 152 | nsCIDPtr contractIDToCID(in string aContractID); |
michael@0 | 153 | }; |
michael@0 | 154 | |
michael@0 | 155 | |
michael@0 | 156 | |
michael@0 | 157 | |
michael@0 | 158 | |
michael@0 | 159 | |
michael@0 | 160 | |
michael@0 | 161 | |
michael@0 | 162 | |
michael@0 | 163 |