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

Delta Between Two Patch Sets: lib/synchronizer.js

Issue 29945631: Issue 7097 - Make element hiding filter objects ephemeral Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Nov. 18, 2018, 3:22 a.m.
Right Patch Set: Simplify Created Nov. 18, 2018, 6:12 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« lib/filterClasses.js ('K') | « lib/subscriptionClasses.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 else 257 else
258 delete subscription.requiredVersion; 258 delete subscription.requiredVersion;
259 259
260 // Process filters 260 // Process filters
261 lines.shift(); 261 lines.shift();
262 let filters = []; 262 let filters = [];
263 for (let line of lines) 263 for (let line of lines)
264 { 264 {
265 line = Filter.normalize(line); 265 line = Filter.normalize(line);
266 if (line) 266 if (line)
267 filters.push(Filter.fromText(line)); 267 filters.push(Filter.fromText(line, false));
268 } 268 }
269 269
270 filterStorage.updateSubscriptionFilters(subscription, filters); 270 filterStorage.updateSubscriptionFilters(subscription, filters);
271 } 271 }
272 272
273 _onDownloadError(downloadable, downloadURL, error, channelStatus, 273 _onDownloadError(downloadable, downloadURL, error, channelStatus,
274 responseStatus, redirectCallback) 274 responseStatus, redirectCallback)
275 { 275 {
276 let subscription = Subscription.fromURL(downloadable.url); 276 let subscription = Subscription.fromURL(downloadable.url);
277 subscription.lastDownload = Math.round(Date.now() / MILLIS_IN_SECOND); 277 subscription.lastDownload = Math.round(Date.now() / MILLIS_IN_SECOND);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 339
340 /** 340 /**
341 * This object is responsible for downloading filter subscriptions whenever 341 * This object is responsible for downloading filter subscriptions whenever
342 * necessary. 342 * necessary.
343 * @type {Synchronizer} 343 * @type {Synchronizer}
344 */ 344 */
345 let synchronizer = new Synchronizer(); 345 let synchronizer = new Synchronizer();
346 346
347 exports.Synchronizer = synchronizer; 347 exports.Synchronizer = synchronizer;
LEFTRIGHT

Powered by Google App Engine
This is Rietveld