зеркало из https://github.com/mozilla/pjs.git
Removing use of nsIShutdownListener r=sspitzer
This commit is contained in:
Родитель
6a6582af16
Коммит
8138489642
|
@ -231,32 +231,7 @@ nsPrefMigration::getPrefService()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrefMigration::QueryInterface(const nsIID& iid,void** result)
|
||||
{
|
||||
nsresult rv = NS_NOINTERFACE;
|
||||
if (! result)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
void *res = nsnull;
|
||||
if (iid.Equals(nsCOMTypeInfo<nsIPrefMigration>::GetIID()) ||
|
||||
iid.Equals(nsCOMTypeInfo<nsISupports>::GetIID()))
|
||||
res = NS_STATIC_CAST(nsIPrefMigration*, this);
|
||||
else if (iid.Equals(nsCOMTypeInfo<nsIShutdownListener>::GetIID()))
|
||||
res = NS_STATIC_CAST(nsIShutdownListener*, this);
|
||||
|
||||
if (res) {
|
||||
NS_ADDREF(this);
|
||||
*result = res;
|
||||
rv = NS_OK;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsPrefMigration)
|
||||
NS_IMPL_RELEASE(nsPrefMigration)
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsPrefMigration, NS_GET_IID(nsIPrefMigration))
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrefMigration::AddProfilePaths(const char * oldProfilePathStr, const char * newProfilePathStr)
|
||||
|
@ -1424,18 +1399,6 @@ nsPrefMigration::SetPremigratedFilePref(const char *pref_name, nsIFileSpec *path
|
|||
return rv;
|
||||
}
|
||||
|
||||
/* called if the prefs service goes offline */
|
||||
NS_IMETHODIMP
|
||||
nsPrefMigration::OnShutdown(const nsCID& aClass, nsISupports *service)
|
||||
{
|
||||
if (aClass.Equals(kPrefServiceCID)) {
|
||||
if (m_prefs) nsServiceManager::ReleaseService(kPrefServiceCID, m_prefs);
|
||||
m_prefs = nsnull;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* This works. Saving for reference
|
||||
|
||||
PRInt32
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#define IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x "%s Rules"
|
||||
#endif
|
||||
|
||||
class nsPrefMigration: public nsIPrefMigration, public nsIShutdownListener
|
||||
class nsPrefMigration: public nsIPrefMigration
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_PREFMIGRATION_CID)
|
||||
|
@ -54,9 +54,6 @@ class nsPrefMigration: public nsIPrefMigration, public nsIShutdownListener
|
|||
|
||||
NS_DECL_NSIPREFMIGRATION
|
||||
|
||||
/* nsIShutdownListener methods */
|
||||
NS_IMETHOD OnShutdown(const nsCID& aClass, nsISupports *service);
|
||||
|
||||
// todo try to move this to private. We need this because we need to call this
|
||||
// from a thread.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче