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

Unified Diff: lib/prefs.js

Issue 29512648: Issue 5475 - Update adblockpluscore dependency to revision hg:b935a0402215 (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Aug. 11, 2017, 12:36 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
Index: lib/prefs.js
diff --git a/lib/prefs.js b/lib/prefs.js
index a708ba75fc9e87d1b366a0f50925d6f6d67243da..7d5ba8ac706128bc4bdf6c03ada4e3aa52ba07a6 100644
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -22,10 +22,8 @@
let defaults = {
__proto__: null,
enabled: true,
- patternsfile: "patterns.ini",
sergei 2017/08/11 12:49:39 now it's hardcoded in adblockpluscore/lib/filtersS
patternsbackups: 5,
patternsbackupinterval: 24,
- data_directory: "",
savestats: false,
privateBrowsing: false,
subscriptions_fallbackerrors: 5,
@@ -53,7 +51,7 @@ let preconfigurable = ["suppress_first_run_page", "disable_auto_updates",
"first_run_subscription_auto_select", "allowed_connection_type"];
let values;
-let path = _fileSystem.resolve("prefs.json");
sergei 2017/08/11 12:49:39 it's renamed because file system does not support
+let prefsFileName = "prefs.json";
let listeners = [];
let isDirty = false;
let isSaving = false;
@@ -83,7 +81,7 @@ function defineProperty(key)
function load()
{
- _fileSystem.read(path, function(result)
+ _fileSystem.read(prefsFileName, function (result)
{
// prefs.json is expected to be missing, ignore errors reading file
if (!result.error)
@@ -117,7 +115,7 @@ function save()
isDirty = false;
isSaving = true;
- _fileSystem.write(path, JSON.stringify(values), function()
+ _fileSystem.write(prefsFileName, JSON.stringify(values), function ()
{
isSaving = false;
if (isDirty)

Powered by Google App Engine
This is Rietveld