[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r15414: Rename diff. (torbutton/trunk/src/components)



Author: mikeperry
Date: 2008-06-22 05:40:32 -0400 (Sun, 22 Jun 2008)
New Revision: 15414

Added:
   torbutton/trunk/src/components/nsSessionStore2.diff
Removed:
   torbutton/trunk/src/components/nsSessionStore.diff
Log:

Rename diff.



Deleted: torbutton/trunk/src/components/nsSessionStore.diff
===================================================================
--- torbutton/trunk/src/components/nsSessionStore.diff	2008-06-22 09:39:28 UTC (rev 15413)
+++ torbutton/trunk/src/components/nsSessionStore.diff	2008-06-22 09:40:32 UTC (rev 15414)
@@ -1,71 +0,0 @@
---- nsSessionStore2.js	2008-04-16 12:02:47.000000000 -0700
-+++ nsSessionStore2.js	2008-06-22 02:34:05.000000000 -0700
-@@ -777,11 +777,26 @@
-     var browsers = tabbrowser.browsers;
-     var tabs = this._windows[aWindow.__SSi].tabs = [];
-     this._windows[aWindow.__SSi].selected = 0;
-+    var prefs = Components.classes["@mozilla.org/preferences-service;1"]
-+        .getService(Components.interfaces.nsIPrefBranch);
-+    var bypass_tor = prefs.getBoolPref("extensions.torbutton.notor_sessionstore");
-+    var bypass_nontor = prefs.getBoolPref("extensions.torbutton.nonontor_sessionstore");
-     
-     for (var i = 0; i < browsers.length; i++) {
-       var tabData = { entries: [], index: 0 };
-       
-       var browser = browsers[i];
-+      if(bypass_tor && typeof(browser.__tb_tor_fetched) != "undefined" && 
-+              browser.__tb_tor_fetched) {
-+          //dump("bypassing tor tab\n");
-+          //tabs.push(tabData);
-+          continue;
-+      }
-+      if(bypass_nontor && typeof(browser.__tb_tor_fetched) != "undefined" &&
-+              !browser.__tb_tor_fetched) {
-+          continue;
-+      }
-+
-       if (!browser || !browser.currentURI) {
-         // can happen when calling this function right after .addTab()
-         tabs.push(tabData);
-@@ -801,6 +816,7 @@
-       
-       if (history && browser.parentNode.__SS_data && browser.parentNode.__SS_data.entries[history.index]) {
-         tabData = browser.parentNode.__SS_data;
-+        if(!tabData) continue;
-         tabData.index = history.index + 1;
-       }
-       else if (history && history.count > 0) {
-@@ -991,7 +1007,7 @@
-     Array.forEach(aWindow.getBrowser().browsers, function(aBrowser, aIx) {
-       try {
-         var tabData = this._windows[aWindow.__SSi].tabs[aIx];
--        if (tabData.entries.length == 0 ||
-+        if (!tabData || tabData.entries.length == 0 ||
-             aBrowser.parentNode.__SS_data && aBrowser.parentNode.__SS_data._tab)
-           return; // ignore incompletely initialized tabs
-         
-@@ -2183,6 +2199,23 @@
-   }
- };
- 
-+const NoModule = {
-+  getClassObject: function(aCompMgr, aCID, aIID) {
-+    Components.returnCode = Cr.NS_ERROR_NOT_REGISTERED;
-+    return null;
-+  },
-+  registerSelf: function(aCompMgr, aFileSpec, aLocation, aType) { return; },
-+  unregisterSelf: function(aCompMgr, aLocation, aType) { return; },
-+  canUnload: function(aCompMgr) { return true; }
-+};
-+
-+
- function NSGetModule(aComMgr, aFileSpec) {
--  return SessionStoreModule;
-+  var prefs = Components.classes["@mozilla.org/preferences-service;1"]
-+        .getService(Components.interfaces.nsIPrefBranch);
-+  if(prefs.getBoolPref("extensions.torbutton.notor_sessionstore")) {
-+    return SessionStoreModule;
-+  } else {
-+    return NoModule;
-+  }
- }

Copied: torbutton/trunk/src/components/nsSessionStore2.diff (from rev 15413, torbutton/trunk/src/components/nsSessionStore.diff)
===================================================================
--- torbutton/trunk/src/components/nsSessionStore2.diff	                        (rev 0)
+++ torbutton/trunk/src/components/nsSessionStore2.diff	2008-06-22 09:40:32 UTC (rev 15414)
@@ -0,0 +1,71 @@
+--- nsSessionStore2.js	2008-04-16 12:02:47.000000000 -0700
++++ nsSessionStore2.js	2008-06-22 02:34:05.000000000 -0700
+@@ -777,11 +777,26 @@
+     var browsers = tabbrowser.browsers;
+     var tabs = this._windows[aWindow.__SSi].tabs = [];
+     this._windows[aWindow.__SSi].selected = 0;
++    var prefs = Components.classes["@mozilla.org/preferences-service;1"]
++        .getService(Components.interfaces.nsIPrefBranch);
++    var bypass_tor = prefs.getBoolPref("extensions.torbutton.notor_sessionstore");
++    var bypass_nontor = prefs.getBoolPref("extensions.torbutton.nonontor_sessionstore");
+     
+     for (var i = 0; i < browsers.length; i++) {
+       var tabData = { entries: [], index: 0 };
+       
+       var browser = browsers[i];
++      if(bypass_tor && typeof(browser.__tb_tor_fetched) != "undefined" && 
++              browser.__tb_tor_fetched) {
++          //dump("bypassing tor tab\n");
++          //tabs.push(tabData);
++          continue;
++      }
++      if(bypass_nontor && typeof(browser.__tb_tor_fetched) != "undefined" &&
++              !browser.__tb_tor_fetched) {
++          continue;
++      }
++
+       if (!browser || !browser.currentURI) {
+         // can happen when calling this function right after .addTab()
+         tabs.push(tabData);
+@@ -801,6 +816,7 @@
+       
+       if (history && browser.parentNode.__SS_data && browser.parentNode.__SS_data.entries[history.index]) {
+         tabData = browser.parentNode.__SS_data;
++        if(!tabData) continue;
+         tabData.index = history.index + 1;
+       }
+       else if (history && history.count > 0) {
+@@ -991,7 +1007,7 @@
+     Array.forEach(aWindow.getBrowser().browsers, function(aBrowser, aIx) {
+       try {
+         var tabData = this._windows[aWindow.__SSi].tabs[aIx];
+-        if (tabData.entries.length == 0 ||
++        if (!tabData || tabData.entries.length == 0 ||
+             aBrowser.parentNode.__SS_data && aBrowser.parentNode.__SS_data._tab)
+           return; // ignore incompletely initialized tabs
+         
+@@ -2183,6 +2199,23 @@
+   }
+ };
+ 
++const NoModule = {
++  getClassObject: function(aCompMgr, aCID, aIID) {
++    Components.returnCode = Cr.NS_ERROR_NOT_REGISTERED;
++    return null;
++  },
++  registerSelf: function(aCompMgr, aFileSpec, aLocation, aType) { return; },
++  unregisterSelf: function(aCompMgr, aLocation, aType) { return; },
++  canUnload: function(aCompMgr) { return true; }
++};
++
++
+ function NSGetModule(aComMgr, aFileSpec) {
+-  return SessionStoreModule;
++  var prefs = Components.classes["@mozilla.org/preferences-service;1"]
++        .getService(Components.interfaces.nsIPrefBranch);
++  if(prefs.getBoolPref("extensions.torbutton.notor_sessionstore")) {
++    return SessionStoreModule;
++  } else {
++    return NoModule;
++  }
+ }