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

Unified Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java

Issue 29524668: Issue 3916 - Supporting Adding filter lists via URL (Closed)
Patch Set: Issue 3916 - Supporting Adding filer lists via URL Created Aug. 23, 2017, 2:20 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java
===================================================================
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java
@@ -215,16 +215,26 @@ final class Subscriptions
if (!this.subscriptions.containsKey(id))
{
this.subscriptions.put(id, sub);
return sub;
}
return this.subscriptions.get(id);
}
+ public boolean remove(final String id)
+ {
+ if (this.subscriptions.containsKey(id))
anton 2017/08/25 10:40:40 the whole method could be replaced with `return th
jens 2017/08/25 11:35:07 Acknowledged. The return values is not needed yet
+ {
+ this.subscriptions.remove(id);
+ return true;
+ }
+ return false;
+ }
+
public static Subscriptions initialize(final Engine engine, final File appFolder,
final File cacheFolder)
{
final Subscriptions subs = new Subscriptions(engine, appFolder, cacheFolder);
subs.subscriptionFolder.mkdirs();
subs.cacheFolder.mkdirs();

Powered by Google App Engine
This is Rietveld