Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/ui/sendReport.js

Issue 11153017: Improve Synchronizer functionality (Closed)
Patch Set: Created July 17, 2013, 12:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 784
785 showPage: function() 785 showPage: function()
786 { 786 {
787 document.documentElement.canAdvance = false; 787 document.documentElement.canAdvance = false;
788 788
789 if (!E("updateInProgress").hidden) 789 if (!E("updateInProgress").hidden)
790 { 790 {
791 document.documentElement.canRewind = false; 791 document.documentElement.canRewind = false;
792 792
793 for (let i = 0; i < this.needUpdate.length; i++) 793 for (let i = 0; i < this.needUpdate.length; i++)
794 Synchronizer.execute(this.needUpdate[i], true, true); 794 Synchronizer.execute(this.needUpdate[i], true);
795 795
796 let listener = function(action) 796 let listener = function(action)
797 { 797 {
798 if (!/^subscription\./.test(action)) 798 if (!/^subscription\./.test(action))
799 return; 799 return;
800 800
801 for (let i = 0; i < this.needUpdate.length; i++) 801 for (let i = 0; i < this.needUpdate.length; i++)
802 if (Synchronizer.isExecuting(this.needUpdate[i].url)) 802 if (Synchronizer.isExecuting(this.needUpdate[i].url))
803 return; 803 return;
804 804
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 window.addEventListener("unload", function() 858 window.addEventListener("unload", function()
859 { 859 {
860 FilterNotifier.removeListener(listener); 860 FilterNotifier.removeListener(listener);
861 }); 861 });
862 } 862 }
863 }, 863 },
864 864
865 updateOutdated: function() 865 updateOutdated: function()
866 { 866 {
867 for (let i = 0; i < this.outdated.length; i++) 867 for (let i = 0; i < this.outdated.length; i++)
868 Synchronizer.execute(this.outdated[i], true, true); 868 Synchronizer.execute(this.outdated[i], true);
869 } 869 }
870 } 870 }
871 871
872 let issuesDataSource = 872 let issuesDataSource =
873 { 873 {
874 contentWnd: null, 874 contentWnd: null,
875 isEnabled: Prefs.enabled, 875 isEnabled: Prefs.enabled,
876 whitelistFilter: null, 876 whitelistFilter: null,
877 disabledFilters: [], 877 disabledFilters: [],
878 disabledSubscriptions: [], 878 disabledSubscriptions: [],
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 1560
1561 function censorURL(url) 1561 function censorURL(url)
1562 { 1562 {
1563 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); 1563 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*");
1564 } 1564 }
1565 1565
1566 function encodeHTML(str) 1566 function encodeHTML(str)
1567 { 1567 {
1568 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;"); 1568 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;");
1569 } 1569 }
OLDNEW

Powered by Google App Engine
This is Rietveld