b=205947, proxy: mailnews does not display proxy auth dialog, r=darin, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@161642 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -349,6 +349,7 @@ NS_INTERFACE_MAP_BEGIN(nsDocShell)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewerContainer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIEditorDocShell)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebPageDescriptor)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAuthPromptProvider)
|
||||
NS_INTERFACE_MAP_END_THREADSAFE
|
||||
|
||||
///*****************************************************************************
|
||||
@@ -7249,3 +7250,26 @@ nsDocShell::SetBaseUrlForWyciwyg(nsIContentViewer * aContentViewer)
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsIAuthPromptProvider
|
||||
//*****************************************************************************
|
||||
|
||||
nsresult
|
||||
nsDocShell::GetAuthPrompt(PRUint32 aPromptReason, nsIAuthPrompt **aResult)
|
||||
{
|
||||
// a priority prompt request will override a false mAllowAuth setting
|
||||
PRBool priorityPrompt = (aPromptReason == nsIAuthPromptProvider::PROMPT_PROXY);
|
||||
|
||||
if (!mAllowAuth && !priorityPrompt)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
// we're either allowing auth, or it's a proxy request
|
||||
nsCOMPtr<nsIAuthPrompt> authPrompter(do_GetInterface(mTreeOwner));
|
||||
if (!authPrompter)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
*aResult = authPrompter;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user