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

Side by Side Diff: lib/firefoxDataCleanup.js

Issue 29715577: Issue 6449 - Switch to Harmony modules (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Add lib/.eslintrc.json Created March 6, 2018, 10:30 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
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
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 "use strict"; 18 import {Filter, ActiveFilter} from "filterClasses";
19 19 import {FilterNotifier} from "filterNotifier";
20 const {Filter, ActiveFilter} = require("filterClasses"); 20 import {FilterStorage} from "filterStorage";
21 const {FilterNotifier} = require("filterNotifier"); 21 import {IO} from "io";
22 const {FilterStorage} = require("filterStorage"); 22 import {Prefs} from "prefs";
23 const {IO} = require("io"); 23 import {SpecialSubscription} from "subscriptionClasses";
24 const {Prefs} = require("prefs");
25 const {SpecialSubscription} = require("subscriptionClasses");
26 24
27 Promise.all([FilterNotifier.once("load"), Prefs.untilLoaded]).then(() => 25 Promise.all([FilterNotifier.once("load"), Prefs.untilLoaded]).then(() =>
28 { 26 {
29 if (Prefs.data_cleanup_done) 27 if (Prefs.data_cleanup_done)
30 return; 28 return;
31 29
32 if (FilterStorage.firstRun) 30 if (FilterStorage.firstRun)
33 { 31 {
34 Prefs.data_cleanup_done = true; 32 Prefs.data_cleanup_done = true;
35 return; 33 return;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 73
76 // Remove any existing automatic backups 74 // Remove any existing automatic backups
77 let backups = []; 75 let backups = [];
78 for (let i = 1; i < 100; i++) 76 for (let i = 1; i < 100; i++)
79 backups.push(`file:patterns-backup${i}.ini`); 77 backups.push(`file:patterns-backup${i}.ini`);
80 browser.storage.local.remove(backups, () => 78 browser.storage.local.remove(backups, () =>
81 { 79 {
82 Prefs.data_cleanup_done = true; 80 Prefs.data_cleanup_done = true;
83 }); 81 });
84 }); 82 });
OLDNEW
« lib/.eslintrc.json ('K') | « lib/filterValidation.js ('k') | lib/icon.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld