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

Unified Diff: lib/synchronizer.js

Issue 29715555: Issue 6447 - Switch to Harmony modules in lib/* (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created March 6, 2018, 7:42 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/common.js ('K') | « lib/subscriptionClasses.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/synchronizer.js
===================================================================
--- a/lib/synchronizer.js
+++ b/lib/synchronizer.js
@@ -16,44 +16,42 @@
*/
"use strict";
/**
* @fileOverview Manages synchronization of filter subscriptions.
*/
-const {Downloader, Downloadable,
- MILLIS_IN_SECOND, MILLIS_IN_MINUTE,
- MILLIS_IN_HOUR, MILLIS_IN_DAY} = require("./downloader");
-const {Filter} = require("./filterClasses");
-const {FilterStorage} = require("./filterStorage");
-const {FilterNotifier} = require("./filterNotifier");
-const {Prefs} = require("prefs");
-const {Subscription,
- DownloadableSubscription} = require("./subscriptionClasses");
-const {Utils} = require("utils");
+import {Downloader, Downloadable,
+ MILLIS_IN_SECOND, MILLIS_IN_MINUTE,
+ MILLIS_IN_HOUR, MILLIS_IN_DAY} from "./downloader";
+import {Filter} from "./filterClasses";
+import {FilterStorage} from "./filterStorage";
+import {FilterNotifier} from "./filterNotifier";
+import {Prefs} from "prefs";
+import {Subscription, DownloadableSubscription} from "./subscriptionClasses";
+import {Utils} from "utils";
const INITIAL_DELAY = 1 * MILLIS_IN_MINUTE;
const CHECK_INTERVAL = 1 * MILLIS_IN_HOUR;
const DEFAULT_EXPIRATION_INTERVAL = 5 * MILLIS_IN_DAY;
/**
* The object providing actual downloading functionality.
* @type {Downloader}
*/
let downloader = null;
/**
* This object is responsible for downloading filter subscriptions whenever
* necessary.
* @class
*/
-let Synchronizer = exports.Synchronizer =
-{
+export let Synchronizer = {
/**
* Called on module startup.
*/
init()
{
downloader = new Downloader(this._getDownloadables.bind(this),
INITIAL_DELAY, CHECK_INTERVAL);
onShutdown.add(() =>
« lib/common.js ('K') | « lib/subscriptionClasses.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld