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

Unified Diff: lib/synchronizer.js

Issue 29556638: Issue 5762 - Use relative require paths (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Use a path alias for the common modules. Created Jan. 3, 2018, 8:11 p.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
« no previous file with comments | « lib/subscriptionClasses.js ('k') | test/_common.js » ('j') | 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
@@ -18,23 +18,24 @@
"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");
+ MILLIS_IN_HOUR, MILLIS_IN_DAY} = require("./downloader");
+const {Filter} = require("./filterClasses");
+const {FilterStorage} = require("./filterStorage");
+const {FilterNotifier} = require("./filterNotifier");
+const {Prefs} = require("abp-modules/prefs");
+const {Subscription,
+ DownloadableSubscription} = require("./subscriptionClasses");
+const {Utils} = require("abp-modules/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}
@@ -303,17 +304,17 @@
if (redirectCallback &&
subscription.errors >= Prefs.subscriptions_fallbackerrors &&
/^https?:\/\//i.test(subscription.url))
{
subscription.errors = 0;
let fallbackURL = Prefs.subscriptions_fallbackurl;
- const {addonVersion} = require("info");
+ const {addonVersion} = require("abp-modules/info");
fallbackURL = fallbackURL.replace(/%VERSION%/g,
encodeURIComponent(addonVersion));
fallbackURL = fallbackURL.replace(/%SUBSCRIPTION%/g,
encodeURIComponent(subscription.url));
fallbackURL = fallbackURL.replace(/%URL%/g,
encodeURIComponent(downloadURL));
fallbackURL = fallbackURL.replace(/%ERROR%/g,
encodeURIComponent(error));
« no previous file with comments | « lib/subscriptionClasses.js ('k') | test/_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld