зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
cbab537b28
Коммит
d36e828b2a
|
@ -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 ----------
|
||||
|
|
Загрузка…
Ссылка в новой задаче