Bug 67412 - set the NotificationCallbacks object on the imap channel so that PSM can get its nsIPrompt. r=jag, sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@86143 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -613,6 +613,11 @@ nsresult nsImapProtocol::SetupWithUrl(nsIURI * aURL, nsISupports* aConsumer)
|
||||
m_channel->GetSecurityInfo(getter_AddRefs(securityInfo));
|
||||
m_mockChannel->SetSecurityInfo(securityInfo);
|
||||
|
||||
// Copy over the notification callbacks object from the mock channel
|
||||
nsCOMPtr<nsIInterfaceRequestor> callbacks;
|
||||
m_mockChannel->GetNotificationCallbacks(getter_AddRefs(callbacks));
|
||||
m_channel->SetNotificationCallbacks(callbacks);
|
||||
|
||||
// and if we have a cache entry that we are saving the message to, set the security info on it too.
|
||||
// since imap only uses the memory cache, passing this on is the right thing to do.
|
||||
nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_runningUrl);
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
#include "rdf.h"
|
||||
#include "nsIMsgFolder.h"
|
||||
#include "nsIMessage.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kCImapMockChannel, NS_IMAPMOCKCHANNEL_CID);
|
||||
@@ -98,8 +100,15 @@ NS_IMETHODIMP nsImapUrl::SetMsgWindow(nsIMsgWindow *aMsgWindow)
|
||||
if (aMsgWindow)
|
||||
{
|
||||
m_msgWindow = do_QueryInterface(aMsgWindow);
|
||||
if (m_mockChannel)
|
||||
if (m_mockChannel) {
|
||||
m_mockChannel->SetURI(this);
|
||||
nsCOMPtr<nsIDocShell> msgDocShell;
|
||||
m_msgWindow->GetRootDocShell(getter_AddRefs(msgDocShell));
|
||||
if (msgDocShell) {
|
||||
nsCOMPtr<nsIInterfaceRequestor> docIR(do_QueryInterface(msgDocShell));
|
||||
m_mockChannel->SetNotificationCallbacks(docIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user