Bug 461627 - Hide the UI for saving certificate exceptions permanently in Private Browsing mode; r=johnath

This commit is contained in:
Ehsan Akhgari 2008-11-04 02:52:23 +03:30
Родитель 07521d5740
Коммит ee60bee20e
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -20,6 +20,7 @@
*
* Contributor(s):
* Johnathan Nightingale <johnath@mozilla.com>
* Ehsan Akhgari <ehsan.akhgari@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -82,6 +83,19 @@ function initExceptionDialog() {
[brandName], 1));
gDialog.getButton("extra1").disabled = true;
// If the Private Browsing service is available and the mode is active,
// don't store permanent exceptions, since they would persist after
// private browsing mode was disabled.
try {
var pb = Components.classes["@mozilla.org/privatebrowsing;1"].
getService(Components.interfaces.nsIPrivateBrowsingService);
if (pb.privateBrowsingEnabled) {
var permanentCheckbox = document.getElementById("permanent");
permanentCheckbox.setAttribute("disabled", "true");
permanentCheckbox.removeAttribute("checked");
}
} catch (ex) {}
var args = window.arguments;
if (args && args[0]) {
if (args[0].location) {