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

Side by Side Diff: lib/prefs.js

Issue 29377570: Issue 4931 - add possibility to not send data depending on connection properties (Closed)
Patch Set: Created Feb. 28, 2017, 10:21 p.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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 currentVersion: "0.0", 42 currentVersion: "0.0",
43 notificationdata: {}, 43 notificationdata: {},
44 notificationurl: "https://notification.adblockplus.org/notification.json", 44 notificationurl: "https://notification.adblockplus.org/notification.json",
45 suppress_first_run_page: false, 45 suppress_first_run_page: false,
46 disable_auto_updates: false, 46 disable_auto_updates: false,
47 first_run_subscription_auto_select: true, 47 first_run_subscription_auto_select: true,
48 notifications_ignoredcategories: [], 48 notifications_ignoredcategories: [],
49 }; 49 };
50 50
51 let preconfigurable = ["suppress_first_run_page", "disable_auto_updates", 51 let preconfigurable = ["suppress_first_run_page", "disable_auto_updates",
52 "first_run_subscription_auto_select"]; 52 "first_run_subscription_auto_select", "allowed_connection_type"];
53 53
54 let values; 54 let values;
55 let path = _fileSystem.resolve("prefs.json"); 55 let path = _fileSystem.resolve("prefs.json");
56 let listeners = []; 56 let listeners = [];
57 let isDirty = false; 57 let isDirty = false;
58 let isSaving = false; 58 let isSaving = false;
59 59
60 function defineProperty(key) 60 function defineProperty(key)
61 { 61 {
62 Object.defineProperty(Prefs, key, 62 Object.defineProperty(Prefs, key,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 defaults[key] = _preconfiguredPrefs[key]; 144 defaults[key] = _preconfiguredPrefs[key];
145 145
146 // Define defaults 146 // Define defaults
147 for (let key in defaults) 147 for (let key in defaults)
148 defineProperty(key); 148 defineProperty(key);
149 149
150 // Set values of prefs based on defaults 150 // Set values of prefs based on defaults
151 values = Object.create(defaults); 151 values = Object.create(defaults);
152 152
153 load(); 153 load();
OLDNEW
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | src/FilterEngine.cpp » ('j') | src/FilterEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld