diff --git a/mailnews/base/util/nsMsgIdentity.cpp b/mailnews/base/util/nsMsgIdentity.cpp index 1b19fc527a0b..7d060eaa4e91 100644 --- a/mailnews/base/util/nsMsgIdentity.cpp +++ b/mailnews/base/util/nsMsgIdentity.cpp @@ -23,9 +23,8 @@ static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID); -NS_IMPL_ISUPPORTS2(nsMsgIdentity, - nsIMsgIdentity, - nsIShutdownListener) +NS_IMPL_ISUPPORTS1(nsMsgIdentity, + nsIMsgIdentity) nsMsgIdentity::nsMsgIdentity(): m_signature(0), @@ -39,9 +38,7 @@ nsMsgIdentity::nsMsgIdentity(): nsMsgIdentity::~nsMsgIdentity() { PR_FREEIF(m_identityKey); - if (m_prefs) nsServiceManager::ReleaseService(kPrefServiceCID, - m_prefs, - nsnull); + if (m_prefs) nsServiceManager::ReleaseService(kPrefServiceCID, m_prefs); } nsresult @@ -50,23 +47,10 @@ nsMsgIdentity::getPrefService() if (m_prefs) return NS_OK; return nsServiceManager::GetService(kPrefServiceCID, nsCOMTypeInfo::GetIID(), - (nsISupports**)&m_prefs, - this); + (nsISupports**)&m_prefs); } -/* called if the prefs service goes offline */ -NS_IMETHODIMP -nsMsgIdentity::OnShutdown(const nsCID& aClass, nsISupports *service) -{ - if (aClass.Equals(kPrefServiceCID)) { - if (m_prefs) nsServiceManager::ReleaseService(kPrefServiceCID, m_prefs); - m_prefs = nsnull; - } - - return NS_OK; -} - /* * accessors for pulling values directly out of preferences * instead of member variables, etc diff --git a/mailnews/base/util/nsMsgIdentity.h b/mailnews/base/util/nsMsgIdentity.h index 698b69f6dcf4..47c25efc2e23 100644 --- a/mailnews/base/util/nsMsgIdentity.h +++ b/mailnews/base/util/nsMsgIdentity.h @@ -31,8 +31,7 @@ ////////////////////////////////////////////////////////////////////////////////// -class NS_MSG_BASE nsMsgIdentity : public nsIMsgIdentity, - public nsIShutdownListener +class NS_MSG_BASE nsMsgIdentity : public nsIMsgIdentity { public: nsMsgIdentity(); @@ -40,10 +39,6 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIMSGIDENTITY - - // nsIShutdownListener - - NS_IMETHOD OnShutdown(const nsCID& aClass, nsISupports *service); private: nsIMsgSignature* m_signature;