| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 983 selectorsString = EMPTY_ELEMHIDE_ARRAY_STRING; | 983 selectorsString = EMPTY_ELEMHIDE_ARRAY_STRING; |
| 984 } | 984 } |
| 985 else | 985 else |
| 986 { | 986 { |
| 987 String[] referrers = new String[] | 987 String[] referrers = new String[] |
| 988 { | 988 { |
| 989 url | 989 url |
| 990 }; | 990 }; |
| 991 | 991 |
| 992 List<Subscription> subscriptions = adblockEngine.getFilterEngine().get ListedSubscriptions(); | 992 List<Subscription> subscriptions = adblockEngine.getFilterEngine().get ListedSubscriptions(); |
| 993 d("Listed subscriptions: " + subscriptions.size()); | 993 try |
| 994 if (debugMode) | 994 { |
| 995 d("Listed subscriptions: " + subscriptions.size()); | |
| 996 if (debugMode) | |
|
diegocarloslima
2017/03/30 14:19:29
Isn't this check redundant here, since d() already
anton
2017/03/30 14:34:15
Acknowledged. Bu it's scope of scope of this task/
| |
| 997 { | |
| 998 for (Subscription eachSubscription : subscriptions) | |
| 999 { | |
| 1000 d("Subscribed to " + eachSubscription); | |
| 1001 } | |
| 1002 } | |
| 1003 } | |
| 1004 finally | |
| 995 { | 1005 { |
| 996 for (Subscription eachSubscription : subscriptions) | 1006 for (Subscription eachSubscription : subscriptions) |
| 997 { | 1007 { |
| 998 d("Subscribed to " + eachSubscription); | 1008 eachSubscription.dispose(); |
| 999 } | 1009 } |
| 1000 } | 1010 } |
| 1001 | 1011 |
| 1002 d("Requesting elemhide selectors from AdblockEngine for " + url + " in " + this); | 1012 d("Requesting elemhide selectors from AdblockEngine for " + url + " in " + this); |
| 1003 List<String> selectors = adblockEngine.getElementHidingSelectors(url, domain, referrers); | 1013 List<String> selectors = adblockEngine.getElementHidingSelectors(url, domain, referrers); |
| 1004 d("Finished requesting elemhide selectors, got " + selectors.size() + " in " + this); | 1014 d("Finished requesting elemhide selectors, got " + selectors.size() + " in " + this); |
| 1005 selectorsString = Utils.stringListToJsonArray(selectors); | 1015 selectorsString = Utils.stringListToJsonArray(selectors); |
| 1006 } | 1016 } |
| 1007 } | 1017 } |
| 1008 finally | 1018 finally |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1415 w("Busy with elemhide selectors, delayed disposing scheduled"); | 1425 w("Busy with elemhide selectors, delayed disposing scheduled"); |
| 1416 elemHideThread.setFinishedRunnable(disposeRunnable); | 1426 elemHideThread.setFinishedRunnable(disposeRunnable); |
| 1417 } | 1427 } |
| 1418 else | 1428 else |
| 1419 { | 1429 { |
| 1420 disposeRunnable.run(); | 1430 disposeRunnable.run(); |
| 1421 } | 1431 } |
| 1422 } | 1432 } |
| 1423 } | 1433 } |
| 1424 } | 1434 } |
| OLD | NEW |