fixes bug 243149 "Hostname and port appears where 'Use Password Manager to remember these values.' usually is." r=biesi sr=dveditz

This commit is contained in:
darin%meer.net 2005-03-23 21:37:35 +00:00
Родитель cbab537b28
Коммит d36e828b2a
1 изменённых файлов: 9 добавлений и 33 удалений

Просмотреть файл

@ -463,8 +463,7 @@ nsHeaderSniffer.prototype = {
QueryInterface: function (iid) {
if (!iid.equals(Components.interfaces.nsIRequestObserver) &&
!iid.equals(Components.interfaces.nsISupports) &&
!iid.equals(Components.interfaces.nsIInterfaceRequestor) &&
!iid.equals(Components.interfaces.nsIAuthPrompt)) {
!iid.equals(Components.interfaces.nsIInterfaceRequestor)) {
throw Components.results.NS_ERROR_NO_INTERFACE;
}
return this;
@ -472,37 +471,14 @@ nsHeaderSniffer.prototype = {
// ---------- nsIInterfaceRequestor methods ----------
getInterface : function(iid) {
return this.QueryInterface(iid);
},
// ---------- nsIAuthPrompt methods ----------
prompt : function(dlgTitle, text, pwrealm, savePW, defaultText, result)
{
dump("authprompt prompt! pwrealm="+pwrealm+"\n");
var promptServ = this.promptService;
if (!promptServ)
return false;
var saveCheck = {value:savePW};
return promptServ.prompt(window, dlgTitle, text, defaultText, pwrealm, saveCheck);
},
promptUsernameAndPassword : function(dlgTitle, text, pwrealm, savePW, user, pw)
{
dump("authprompt promptUsernameAndPassword! "+dlgTitle+" "+text+", pwrealm="+pwrealm+"\n");
var promptServ = this.promptService;
if (!promptServ)
return false;
var saveCheck = {value:savePW};
return promptServ.promptUsernameAndPassword(window, dlgTitle, text, user, pw, pwrealm, saveCheck);
},
promptPassword : function(dlgTitle, text, pwrealm, savePW, pw)
{
dump("auth promptPassword! "+dlgTitle+" "+text+", pwrealm="+pwrealm+"\n");
var promptServ = this.promptService;
if (!promptServ)
return false;
var saveCheck = {value:savePW};
return promptServ.promptPassword(window, dlgTitle, text, pw, pwrealm, saveCheck);
if (iid.equals(Components.interfaces.nsIAuthPrompt)) {
// use the window watcher service to get a nsIAuthPrompt impl
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
return ww.getNewAuthPrompter(window);
}
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
return null;
},
// ---------- nsIRequestObserver methods ----------