LEFT | RIGHT |
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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 const INITIAL_DELAY = 1 * MILLIS_IN_MINUTE; | 34 const INITIAL_DELAY = 1 * MILLIS_IN_MINUTE; |
35 const CHECK_INTERVAL = 1 * MILLIS_IN_HOUR; | 35 const CHECK_INTERVAL = 1 * MILLIS_IN_HOUR; |
36 const DEFAULT_EXPIRATION_INTERVAL = 5 * MILLIS_IN_DAY; | 36 const DEFAULT_EXPIRATION_INTERVAL = 5 * MILLIS_IN_DAY; |
37 | 37 |
38 /** | 38 /** |
39 * Downloads filter subscriptions whenever necessary. | 39 * Downloads filter subscriptions whenever necessary. |
40 */ | 40 */ |
41 class Synchronizer | 41 class Synchronizer |
42 { | 42 { |
| 43 /** |
| 44 * @hideconstructor |
| 45 */ |
43 constructor() | 46 constructor() |
44 { | 47 { |
45 /** | 48 /** |
46 * The object providing actual downloading functionality. | 49 * The object providing actual downloading functionality. |
47 * @type {Downloader} | 50 * @type {Downloader} |
48 */ | 51 */ |
49 this._downloader = new Downloader(this._getDownloadables.bind(this), | 52 this._downloader = new Downloader(this._getDownloadables.bind(this), |
50 INITIAL_DELAY, CHECK_INTERVAL); | 53 INITIAL_DELAY, CHECK_INTERVAL); |
51 onShutdown.add(() => | 54 onShutdown.add(() => |
52 { | 55 { |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 339 } |
337 | 340 |
338 /** | 341 /** |
339 * This object is responsible for downloading filter subscriptions whenever | 342 * This object is responsible for downloading filter subscriptions whenever |
340 * necessary. | 343 * necessary. |
341 * @type {Synchronizer} | 344 * @type {Synchronizer} |
342 */ | 345 */ |
343 let synchronizer = new Synchronizer(); | 346 let synchronizer = new Synchronizer(); |
344 | 347 |
345 exports.Synchronizer = synchronizer; | 348 exports.Synchronizer = synchronizer; |
LEFT | RIGHT |