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