| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus, | 2 * This file is part of the Adblock Plus, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 * Checks whether private browsing is enabled for a particular window. | 726 * Checks whether private browsing is enabled for a particular window. |
| 727 */ | 727 */ |
| 728 enabledForWindow: function(/**Window*/ wnd) /**Boolean*/ | 728 enabledForWindow: function(/**Window*/ wnd) /**Boolean*/ |
| 729 { | 729 { |
| 730 try | 730 try |
| 731 { | 731 { |
| 732 return wnd.QueryInterface(Ci.nsIInterfaceRequestor) | 732 return wnd.QueryInterface(Ci.nsIInterfaceRequestor) |
| 733 .getInterface(Ci.nsILoadContext) | 733 .getInterface(Ci.nsILoadContext) |
| 734 .usePrivateBrowsing; | 734 .usePrivateBrowsing; |
| 735 } | 735 } |
| 736 catch(e) | 736 catch (e) |
| 737 { | 737 { |
| 738 // Gecko 19 and below will throw NO_INTERFACE, this is expected | 738 // Gecko 19 and below will throw NS_NOINTERFACE, this is expected |
| 739 if (e.result != Cr.NS_NOINTERFACE) |
| 740 Cu.reportError(e); |
| 739 return false; | 741 return false; |
| 740 } | 742 } |
| 741 }, | 743 }, |
| 742 | 744 |
| 743 init: function() | 745 init: function() |
| 744 { | 746 { |
| 745 if ("@mozilla.org/privatebrowsing;1" in Cc) | 747 if ("@mozilla.org/privatebrowsing;1" in Cc) |
| 746 { | 748 { |
| 747 try | 749 try |
| 748 { | 750 { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 else if (this.wantObj === false && val) | 872 else if (this.wantObj === false && val) |
| 871 this.curObj.push(val.replace(/\\\[/g, "[")); | 873 this.curObj.push(val.replace(/\\\[/g, "[")); |
| 872 } | 874 } |
| 873 finally | 875 finally |
| 874 { | 876 { |
| 875 Filter.knownFilters = origKnownFilters; | 877 Filter.knownFilters = origKnownFilters; |
| 876 Subscription.knownSubscriptions = origKnownSubscriptions; | 878 Subscription.knownSubscriptions = origKnownSubscriptions; |
| 877 } | 879 } |
| 878 } | 880 } |
| 879 }; | 881 }; |
| LEFT | RIGHT |