Bug 510523 - Checking "Remember for this site" stops prompt from working on file:// URIs. r=dougt/gavin

--HG--
extra : rebase_source : 0a17f35c5d9220e4a1c852d22b245bba8a5afb5b
This commit is contained in:
Martin McNickle 2009-12-13 14:38:16 -08:00
Родитель 2c1eb947b7
Коммит db0c928c24
1 изменённых файлов: 8 добавлений и 1 удалений

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

@ -1228,7 +1228,14 @@ GeolocationPrompt.prototype = {
var inPrivateBrowsing = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService).
privateBrowsingEnabled;
if (!inPrivateBrowsing) {
// don't show "Remember for this site" checkbox for file:
var host;
try {
host = request.requestingURI.host;
} catch (ex) {}
if (!inPrivateBrowsing && host) {
var checkbox = newBar.ownerDocument.createElementNS(XULNS, "checkbox");
checkbox.className = "rememberChoice";
checkbox.setAttribute("label", browserBundle.GetStringFromName("geolocation.remember"));