зеркало из https://github.com/mozilla/gecko-dev.git
Removing use of nsIShutdownListener r=sspitzer
This commit is contained in:
Родитель
b0a2b142a1
Коммит
b21e2079e7
|
@ -231,32 +231,7 @@ nsPrefMigration::getPrefService()
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMPL_ISUPPORTS(nsPrefMigration, NS_GET_IID(nsIPrefMigration))
|
||||||
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_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsPrefMigration::AddProfilePaths(const char * oldProfilePathStr, const char * newProfilePathStr)
|
nsPrefMigration::AddProfilePaths(const char * oldProfilePathStr, const char * newProfilePathStr)
|
||||||
|
@ -1424,18 +1399,6 @@ nsPrefMigration::SetPremigratedFilePref(const char *pref_name, nsIFileSpec *path
|
||||||
return rv;
|
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
|
/* This works. Saving for reference
|
||||||
|
|
||||||
PRInt32
|
PRInt32
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#define IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x "%s Rules"
|
#define IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x "%s Rules"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class nsPrefMigration: public nsIPrefMigration, public nsIShutdownListener
|
class nsPrefMigration: public nsIPrefMigration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DEFINE_STATIC_CID_ACCESSOR(NS_PREFMIGRATION_CID)
|
NS_DEFINE_STATIC_CID_ACCESSOR(NS_PREFMIGRATION_CID)
|
||||||
|
@ -54,9 +54,6 @@ class nsPrefMigration: public nsIPrefMigration, public nsIShutdownListener
|
||||||
|
|
||||||
NS_DECL_NSIPREFMIGRATION
|
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
|
// todo try to move this to private. We need this because we need to call this
|
||||||
// from a thread.
|
// from a thread.
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче