Bug 1170441 - Remove dead methods _getPasswordOrigin and _getActionOrigin in nsLoginManager.js.

--HG--
extra : rebase_source : 7030a6f2d9724ef0f10afd860017d6aa8c409412
This commit is contained in:
Matthew Noorenberghe 2015-06-02 00:20:03 -07:00
Родитель 973fe646aa
Коммит dbd3fc3d68
1 изменённых файлов: 0 добавлений и 49 удалений

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

@ -334,7 +334,6 @@ LoginManager.prototype = {
return this._storage.addLogin(login);
},
/*
* removeLogin
*
@ -527,54 +526,6 @@ LoginManager.prototype = {
})
.then(null, Cu.reportError);
},
/* ------- Internal methods / callbacks for document integration ------- */
/*
* _getPasswordOrigin
*
* Get the parts of the URL we want for identification.
*/
_getPasswordOrigin : function (uriString, allowJS) {
var realm = "";
try {
var uri = Services.io.newURI(uriString, null, null);
if (allowJS && uri.scheme == "javascript")
return "javascript:"
realm = uri.scheme + "://" + uri.host;
// If the URI explicitly specified a port, only include it when
// it's not the default. (We never want "http://foo.com:80")
var port = uri.port;
if (port != -1) {
var handler = Services.io.getProtocolHandler(uri.scheme);
if (port != handler.defaultPort)
realm += ":" + port;
}
} catch (e) {
// bug 159484 - disallow url types that don't support a hostPort.
// (although we handle "javascript:..." as a special case above.)
log("Couldn't parse origin for", uriString);
realm = null;
}
return realm;
},
_getActionOrigin : function (form) {
var uriString = form.action;
// A blank or missing action submits to where it came from.
if (uriString == "")
uriString = form.baseURI; // ala bug 297761
return this._getPasswordOrigin(uriString, true);
},
}; // end of LoginManager implementation
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([LoginManager]);