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

Side by Side Diff: messageResponder.js

Issue 29337878: Issue 3736 - Fixed: Checks for share resources failed (Closed)
Patch Set: Created March 4, 2016, 5:19 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 break; 184 break;
185 case "filters.add": 185 case "filters.add":
186 var filter = Filter.fromText(message.text); 186 var filter = Filter.fromText(message.text);
187 var result = require("filterValidation").parseFilter(message.text); 187 var result = require("filterValidation").parseFilter(message.text);
188 if (result.error) 188 if (result.error)
189 sendMessage("app", "error", [result.error.toString()], sender.page); 189 sendMessage("app", "error", [result.error.toString()], sender.page);
190 else if (result.filter) 190 else if (result.filter)
191 FilterStorage.addFilter(result.filter); 191 FilterStorage.addFilter(result.filter);
192 break; 192 break;
193 case "filters.blocked": 193 case "filters.blocked":
194 var filter = defaultMatcher.matchesAny(message.url, message.requestType, 194 var filter = defaultMatcher.matchesAny(message.url,
195 message.docDomain, message.thirdParty); 195 RegExpFilter.typeMap[message.requestType], message.docDomain,
196 message.thirdParty);
196 callback(filter instanceof BlockingFilter); 197 callback(filter instanceof BlockingFilter);
197 break; 198 break;
198 case "filters.get": 199 case "filters.get":
199 if (message.what == "cssproperties") 200 if (message.what == "cssproperties")
200 { 201 {
201 var filters = []; 202 var filters = [];
202 var checkWhitelisted = require("whitelisting").checkWhitelisted; 203 var checkWhitelisted = require("whitelisting").checkWhitelisted;
203 204
204 if (!checkWhitelisted(sender.page, sender.frame, 205 if (!checkWhitelisted(sender.page, sender.frame,
205 RegExpFilter.typeMap.DOCUMENT | 206 RegExpFilter.typeMap.DOCUMENT |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (subscription instanceof DownloadableSubscription) 364 if (subscription instanceof DownloadableSubscription)
364 Synchronizer.execute(subscription, true); 365 Synchronizer.execute(subscription, true);
365 } 366 }
366 break; 367 break;
367 case "subscriptions.isDownloading": 368 case "subscriptions.isDownloading":
368 callback(Synchronizer.isExecuting(message.url)); 369 callback(Synchronizer.isExecuting(message.url));
369 break; 370 break;
370 } 371 }
371 }); 372 });
372 })(this); 373 })(this);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld