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

Delta Between Two Patch Sets: adblockplus/Api.jsm

Issue 29350065: Issue 2853 - Settings changes are sometimes not saved if the user quits the app (Closed)
Left Patch Set: Fixing a bug where uncompleted requests could be sent out of order with the use of filter load pool… Created Dec. 26, 2016, 9:32 p.m.
Right Patch Set: Renaming 'uncompleted' to 'pending' Created Jan. 31, 2017, 8 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | mobile/android/base/GeckoApplication.java » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 }, 179 },
180 initCommunication: function() 180 initCommunication: function()
181 { 181 {
182 initFilterListeners(); 182 initFilterListeners();
183 183
184 Messaging.addListener((function(data) 184 Messaging.addListener((function(data)
185 { 185 {
186 if (!data) 186 if (!data)
187 return {"success": false, "error": "malformed request"}; 187 return {"success": false, "error": "malformed request"};
188 188
189 if (data["action"] == "getFiltersLoaded")
190 return {"success": true, "value": this.filtersLoaded};
191
192 if (!this.filtersLoaded) 189 if (!this.filtersLoaded)
193 return {"success": false, "error": "filters not loaded"}; 190 return {"success": false, "error": "filters not loaded"};
194 191
195 switch (data["action"]) 192 switch (data["action"])
196 { 193 {
197 case "getAcceptableAdsEnabled": 194 case "getAcceptableAdsEnabled":
198 return {"success": true, "value": this.acceptableAdsEnabled}; 195 return {"success": true, "value": this.acceptableAdsEnabled};
199 case "setAcceptableAdsEnabled": 196 case "setAcceptableAdsEnabled":
200 if ("enable" in data) 197 if ("enable" in data)
201 { 198 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 { 240 {
244 this.whitelistSite(data["url"], data["whitelisted"]); 241 this.whitelistSite(data["url"], data["whitelisted"]);
245 return {"success": true}; 242 return {"success": true};
246 } 243 }
247 break; 244 break;
248 } 245 }
249 return {"success": false, "error": "malformed request"}; 246 return {"success": false, "error": "malformed request"};
250 }).bind(this), "AdblockPlus:Api"); 247 }).bind(this), "AdblockPlus:Api");
251 } 248 }
252 }; 249 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld