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

Side by Side Diff: lib/iniParser.js

Issue 29870577: Issue 6916 - Encapsulate filter subscriptions (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Add subscriptionCount property Created Sept. 1, 2018, 2:16 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 | « lib/filterStorage.js ('k') | test/filterListener.js » ('j') | 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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 case "subscription filters": 103 case "subscription filters":
104 if (this.subscriptions.length) 104 if (this.subscriptions.length)
105 { 105 {
106 let currentSubscription = this.subscriptions[ 106 let currentSubscription = this.subscriptions[
107 this.subscriptions.length - 1 107 this.subscriptions.length - 1
108 ]; 108 ];
109 for (let text of this._curObj) 109 for (let text of this._curObj)
110 { 110 {
111 let filter = Filter.fromText(text); 111 let filter = Filter.fromText(text);
112 currentSubscription.filters.push(filter); 112 currentSubscription.filters.push(filter);
113 filter.subscriptions.add(currentSubscription); 113 filter.addSubscription(currentSubscription);
114 } 114 }
115 } 115 }
116 break; 116 break;
117 } 117 }
118 } 118 }
119 119
120 if (line === null) 120 if (line === null)
121 return; 121 return;
122 122
123 this._curSection = match[1].toLowerCase(); 123 this._curSection = match[1].toLowerCase();
(...skipping 20 matching lines...) Expand all
144 } 144 }
145 finally 145 finally
146 { 146 {
147 Filter.knownFilters = origKnownFilters; 147 Filter.knownFilters = origKnownFilters;
148 Subscription.knownSubscriptions = origKnownSubscriptions; 148 Subscription.knownSubscriptions = origKnownSubscriptions;
149 } 149 }
150 } 150 }
151 } 151 }
152 152
153 exports.INIParser = INIParser; 153 exports.INIParser = INIParser;
OLDNEW
« no previous file with comments | « lib/filterStorage.js ('k') | test/filterListener.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld