[or-cvs] r13652: Clean up XXXs and FIXMEs (in torbutton/trunk/src: chrome/content components)
mikeperry at seul.org
mikeperry at seul.org
Thu Feb 21 09:40:14 UTC 2008
Author: mikeperry
Date: 2008-02-21 04:40:14 -0500 (Thu, 21 Feb 2008)
New Revision: 13652
Modified:
torbutton/trunk/src/chrome/content/jshooks.js
torbutton/trunk/src/chrome/content/preferences.xul
torbutton/trunk/src/chrome/content/torbutton.js
torbutton/trunk/src/components/cssblocker.js
torbutton/trunk/src/components/ignore-history.js
torbutton/trunk/src/components/window-mapper.js
Log:
Clean up XXXs and FIXMEs
Modified: torbutton/trunk/src/chrome/content/jshooks.js
===================================================================
--- torbutton/trunk/src/chrome/content/jshooks.js 2008-02-21 09:24:18 UTC (rev 13651)
+++ torbutton/trunk/src/chrome/content/jshooks.js 2008-02-21 09:40:14 UTC (rev 13652)
@@ -93,9 +93,6 @@
// This can potentially be done by hooking shistory;1 component, but
// this is simpler and less code.
- // XXX: probably should do it that way for localization and
- // Non-Tor -> Tor correlation protection
- // XXX: Also needs localization
if(window.__tb_block_js_history==true) {
var htmp = window.history;
var hmine = new Object();
@@ -105,6 +102,7 @@
var f = function() {
if(!ran) {
ran = 1;
+ // XXX: Also needs localization
window.alert("Torbutton blocked Javascript history manipulation.\n\nSee history settings to allow.\n\n");
}
}
Modified: torbutton/trunk/src/chrome/content/preferences.xul
===================================================================
--- torbutton/trunk/src/chrome/content/preferences.xul 2008-02-21 09:24:18 UTC (rev 13651)
+++ torbutton/trunk/src/chrome/content/preferences.xul 2008-02-21 09:40:14 UTC (rev 13652)
@@ -121,7 +121,6 @@
</tabs>
<tabpanels style="border: 0px">
<tabpanel id="plugins">
- <!-- XXX: Border? -->
<vbox>
<checkbox id="torbutton_disablePlugins" label="&torbutton.prefs.disable_plugins;"
oncommand="torbutton_prefs_set_field_attributes(document)"/>
Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js 2008-02-21 09:24:18 UTC (rev 13651)
+++ torbutton/trunk/src/chrome/content/torbutton.js 2008-02-21 09:40:14 UTC (rev 13652)
@@ -16,7 +16,6 @@
var pref_service = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranchInternal);
this._branch = pref_service.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
- // FIXME: Narrow these topics
this._branch.addObserver("extensions.torbutton", this, false);
},
@@ -56,7 +55,6 @@
var pref_service = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranchInternal);
this._branch = pref_service.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
- // FIXME: Narrow these topics
this._branch.addObserver("extensions.torbutton", this, false);
this._branch.addObserver("network.proxy", this, false);
},
@@ -1244,7 +1242,7 @@
function torbutton_close_window(event) {
torbutton_window_pref_observer.unregister();
- // XXX: This is a real ghetto hack.. When the original window
+ // TODO: This is a real ghetto hack.. When the original window
// closes, we need to find another window to handle observing
// unique events... The right way to do this is to move the
// majority of torbutton functionality into a XPCOM component..
@@ -1317,7 +1315,7 @@
return (typeof(obj[flag]) != 'undefined');
}
-function torbutton_is_same_origin(source, target) {
+function torbutton_is_same_origin(source, target) { // unused.
var fixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
.getService(Components.interfaces.nsIURIFixup);
var source = fixup.createFixupURI(win.top.location.href, 0);
@@ -1330,7 +1328,7 @@
torbutton_log(5, "Can't convert one of: "+win.document.location+", parent is: "+win.top.document.location);
}
- // XXX: this doesn't work.. esp if document modifies document.domain
+ // TODO: this doesn't work.. esp if document modifies document.domain
// window.windowRoot instead? Also, prints an error message
// to the error console..
try {
@@ -1353,7 +1351,7 @@
.getService(Components.interfaces.nsISupports)
.wrappedJSObject;
- // Expire the cache on page loads. FIXME: Do a timer instead..
+ // Expire the cache on page loads. TODO: Do a timer instead..
if(win == win.top) wm.expireOldCache();
var browser = wm.getBrowserForContentWindow(win.top);
@@ -1419,7 +1417,7 @@
var js_enabled = m_tb_prefs.getBoolPref("javascript.enabled");
- if(!js_enabled) // XXX: bug #460 hack
+ if(!js_enabled) // bug #460 hack
win.wrappedJSObject.__tb_hooks_ran = true;
// No need to hook js if tor is off
@@ -1494,7 +1492,7 @@
}
}
- // XXX if intstanceof nsIHttpChannel check headers for
+ // FIXME if intstanceof nsIHttpChannel check headers for
// Content-Disposition..
// This noise is a workaround for firefox bugs involving
@@ -1578,7 +1576,7 @@
torbutton_eclog(3, 'Exception on request cancel');
}
- // XXX: separate this from the above?
+ // TODO: separate this from the above?
if(DOMWindow) {
var doc = DOMWindow.document;
try {
Modified: torbutton/trunk/src/components/cssblocker.js
===================================================================
--- torbutton/trunk/src/components/cssblocker.js 2008-02-21 09:24:18 UTC (rev 13651)
+++ torbutton/trunk/src/components/cssblocker.js 2008-02-21 09:40:14 UTC (rev 13652)
@@ -107,7 +107,7 @@
this.logger = Components.classes["@torproject.org/torbutton-logger;1"]
.getService(Components.interfaces.nsISupports).wrappedJSObject;
- // Register observer: FIXME: Restrict this to extensions.torbutton branch?
+ // Register observer:
var pref_service = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranchInternal);
this._branch = pref_service.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
@@ -186,23 +186,6 @@
var node = wrapNode(insecNode);
var wind = getWindow(node);
- // Block file in tor mode.
- // XXX: Add checkbox? Only ask in tor?
- // NO! This is EXPLICITLY FORBIDDEN in the nsIContentPolicy doc!
- //var scheme = contentLocation.spec.replace(/:.*/, "").toLowerCase();
- /*
- if(scheme == "file") {
- var windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
- getService(Ci.nsIWindowMediator);
- var nav = windowMediator.getMostRecentWindow("navigator:browser");
- var load = nav.confirm("WARNING! Loading files allows malicious script to read+transmit files from your hard drive!\n\nAre you sure you want to do this?\n\n");
- if(load) {
- return ok;
- } else {
- return block;
- }
- } */
-
// For frame elements go to their window
if (contentType == CPolicy.TYPE_SUBDOCUMENT && node.contentWindow) {
node = node.contentWindow;
Modified: torbutton/trunk/src/components/ignore-history.js
===================================================================
--- torbutton/trunk/src/components/ignore-history.js 2008-02-21 09:24:18 UTC (rev 13651)
+++ torbutton/trunk/src/components/ignore-history.js 2008-02-21 09:40:14 UTC (rev 13652)
@@ -75,7 +75,7 @@
/*
* Determine whether we should hide visited links
*/
- // XXX: Make observer?
+ // FIXME: Make observer?
blockReadHistory: function() {
return ((this._prefs.getBoolPref("extensions.torbutton.block_thread")
&& this._prefs.getBoolPref("extensions.torbutton.tor_enabled"))
Modified: torbutton/trunk/src/components/window-mapper.js
===================================================================
--- torbutton/trunk/src/components/window-mapper.js 2008-02-21 09:24:18 UTC (rev 13651)
+++ torbutton/trunk/src/components/window-mapper.js 2008-02-21 09:40:14 UTC (rev 13652)
@@ -99,7 +99,6 @@
getBrowserForContentWindow: function(topContentWindow) {
if(topContentWindow instanceof Components.interfaces.nsIDOMChromeWindow) {
if(topContentWindow.browserDOMWindow) {
- // XXX: is this not a tabbed browser?
var browser = topContentWindow.getBrowser().selectedTab.linkedBrowser;
this.logger.log(3, "Chrome browser at "
+browser.contentWindow.location+" found for: "
More information about the tor-commits
mailing list