зеркало из https://github.com/mozilla/gecko-dev.git
Pass an nsIPrompt instance to the login redirector. r=jelwell, sr=mscott
This commit is contained in:
Родитель
7ebb6b839c
Коммит
9342ec717f
|
@ -1660,7 +1660,10 @@ nsresult nsSmtpProtocol::RequestOverrideInfo(nsISmtpServer * aSmtpServer)
|
|||
m_logonRedirector->RequiresPassword(userName, &requiresPassword);
|
||||
if (requiresPassword)
|
||||
GetPassword(getter_Copies(password));
|
||||
rv = m_logonRedirector->Logon(userName, password, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp);
|
||||
|
||||
nsCOMPtr<nsIPrompt> prompter;
|
||||
m_runningURL->GetPrompt(getter_AddRefs(prompter));
|
||||
rv = m_logonRedirector->Logon(userName, password, prompter, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp);
|
||||
}
|
||||
|
||||
// this protocol instance now needs to wait until
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "nsISupports.idl"
|
||||
|
||||
typedef long nsMsgLogonRedirectionState;
|
||||
interface nsIPrompt;
|
||||
|
||||
[scriptable, uuid(e20261f6-df4f-11d3-b9f9-00108335942a)]
|
||||
interface nsMsgLogonRedirectionStates
|
||||
|
@ -46,7 +47,7 @@ interface nsIMsgLogonRedirector : nsISupports
|
|||
// wishes to log on.
|
||||
// aUserName --> the user name we wish to log in under...
|
||||
boolean requiresPassword(in string aUserName);
|
||||
void logon(in string userName, in string password, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID);
|
||||
void logon(in string userName, in string password, in nsIPrompt aPrompt, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID);
|
||||
void logoff(in string userName); /* might not need this one */
|
||||
};
|
||||
|
||||
|
|
|
@ -2002,7 +2002,9 @@ nsresult nsImapIncomingServer::RequestOverrideInfo(nsIMsgWindow *aMsgWindow)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
rv = m_logonRedirector->Logon(userName, password, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);
|
||||
nsCOMPtr<nsIPrompt> dialogPrompter;
|
||||
aMsgWindow->GetPromptDialog(getter_AddRefs(dialogPrompter));
|
||||
rv = m_logonRedirector->Logon(userName, password, dialogPrompter, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче