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-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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 /** @module subscriptionInit */ | 18 /** @module subscriptionInit */ |
19 | 19 |
20 "use strict"; | 20 "use strict"; |
21 | 21 |
22 const {Subscription, | 22 const {Subscription, |
23 DownloadableSubscription, | 23 DownloadableSubscription, |
24 SpecialSubscription} = | 24 SpecialSubscription} = |
25 require("../adblockpluscore/lib/subscriptionClasses"); | 25 require("../adblockpluscore/lib/subscriptionClasses"); |
26 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); | 26 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); |
27 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); | 27 const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier"); |
28 const info = require("../buildtools/info"); | 28 const info = require("info"); |
29 const {Prefs} = require("./prefs"); | 29 const {Prefs} = require("./prefs"); |
30 const {Synchronizer} = require("../adblockpluscore/lib/synchronizer"); | 30 const {Synchronizer} = require("../adblockpluscore/lib/synchronizer"); |
31 const {Utils} = require("./utils"); | 31 const {Utils} = require("./utils"); |
32 const {initNotifications} = require("./notificationHelper"); | 32 const {initNotifications} = require("./notificationHelper"); |
33 const {updatesVersion} = require("../adblockplusui/lib/prefs"); | 33 const {updatesVersion} = require("../adblockplusui/lib/prefs"); |
34 | 34 |
35 let firstRun; | 35 let firstRun; |
36 let subscriptionsCallback = null; | 36 let subscriptionsCallback = null; |
37 let reinitialized = false; | 37 let reinitialized = false; |
38 let dataCorrupted = false; | 38 let dataCorrupted = false; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 * Sets a callback that is called with an array of subscriptions to be added | 299 * Sets a callback that is called with an array of subscriptions to be added |
300 * during initialization. The callback must return an array of subscriptions | 300 * during initialization. The callback must return an array of subscriptions |
301 * that will effectively be added. | 301 * that will effectively be added. |
302 * | 302 * |
303 * @param {function} callback | 303 * @param {function} callback |
304 */ | 304 */ |
305 exports.setSubscriptionsCallback = callback => | 305 exports.setSubscriptionsCallback = callback => |
306 { | 306 { |
307 subscriptionsCallback = callback; | 307 subscriptionsCallback = callback; |
308 }; | 308 }; |
OLD | NEW |