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 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * The nsIServiceManager manager interface provides a means to obtain |
michael@0 | 10 | * global services in an application. The service manager depends on the |
michael@0 | 11 | * repository to find and instantiate factories to obtain services. |
michael@0 | 12 | * |
michael@0 | 13 | * Users of the service manager must first obtain a pointer to the global |
michael@0 | 14 | * service manager by calling NS_GetServiceManager. After that, |
michael@0 | 15 | * they can request specific services by calling GetService. When they are |
michael@0 | 16 | * finished they can NS_RELEASE() the service as usual. |
michael@0 | 17 | * |
michael@0 | 18 | * A user of a service may keep references to particular services indefinitely |
michael@0 | 19 | * and only must call Release when it shuts down. |
michael@0 | 20 | */ |
michael@0 | 21 | |
michael@0 | 22 | [scriptable, uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)] |
michael@0 | 23 | interface nsIServiceManager : nsISupports |
michael@0 | 24 | { |
michael@0 | 25 | /** |
michael@0 | 26 | * getServiceByContractID |
michael@0 | 27 | * |
michael@0 | 28 | * Returns the instance that implements aClass or aContractID and the |
michael@0 | 29 | * interface aIID. This may result in the instance being created. |
michael@0 | 30 | * |
michael@0 | 31 | * @param aClass or aContractID : aClass or aContractID of object |
michael@0 | 32 | * instance requested |
michael@0 | 33 | * @param aIID : IID of interface requested |
michael@0 | 34 | * @param result : resulting service |
michael@0 | 35 | */ |
michael@0 | 36 | void getService(in nsCIDRef aClass, |
michael@0 | 37 | in nsIIDRef aIID, |
michael@0 | 38 | [iid_is(aIID),retval] out nsQIResult result); |
michael@0 | 39 | |
michael@0 | 40 | void getServiceByContractID(in string aContractID, |
michael@0 | 41 | in nsIIDRef aIID, |
michael@0 | 42 | [iid_is(aIID),retval] out nsQIResult result); |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * isServiceInstantiated |
michael@0 | 46 | * |
michael@0 | 47 | * isServiceInstantiated will return a true if the service has already |
michael@0 | 48 | * been created, or throw otherwise |
michael@0 | 49 | * |
michael@0 | 50 | * @param aClass or aContractID : aClass or aContractID of object |
michael@0 | 51 | * instance requested |
michael@0 | 52 | * @param aIID : IID of interface requested |
michael@0 | 53 | * @throws NS_ERROR_SERVICE_NOT_AVAILABLE if the service hasn't been |
michael@0 | 54 | * instantiated |
michael@0 | 55 | * @throws NS_NOINTERFACE if the IID given isn't supported by the object |
michael@0 | 56 | */ |
michael@0 | 57 | boolean isServiceInstantiated(in nsCIDRef aClass, in nsIIDRef aIID); |
michael@0 | 58 | boolean isServiceInstantiatedByContractID(in string aContractID, in nsIIDRef aIID); |
michael@0 | 59 | }; |
michael@0 | 60 | |
michael@0 | 61 | |
michael@0 | 62 | %{C++ |
michael@0 | 63 | // Observing xpcom autoregistration. Topics will be 'start' and 'stop'. |
michael@0 | 64 | #define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration" |
michael@0 | 65 | |
michael@0 | 66 | #ifdef MOZILLA_INTERNAL_API |
michael@0 | 67 | #include "nsXPCOM.h" |
michael@0 | 68 | #include "nsComponentManagerUtils.h" |
michael@0 | 69 | #include "nsServiceManagerUtils.h" |
michael@0 | 70 | #endif |
michael@0 | 71 | %} |
michael@0 | 72 |