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

Side by Side Diff: lib/prefs.js

Issue 10800079: Implemented update checking functionality (Closed)
Patch Set: Created June 5, 2013, 6:47 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
« no previous file with comments | « lib/api.js ('k') | lib/updater.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 15 matching lines...) Expand all
26 patternsbackups: 5, 26 patternsbackups: 5,
27 patternsbackupinterval: 24, 27 patternsbackupinterval: 24,
28 data_directory: "", 28 data_directory: "",
29 savestats: false, 29 savestats: false,
30 privateBrowsing: false, 30 privateBrowsing: false,
31 subscriptions_fallbackerrors: 5, 31 subscriptions_fallbackerrors: 5,
32 subscriptions_fallbackurl: "https://adblockplus.org/getSubscription?version=%V ERSION%&url=%SUBSCRIPTION%&downloadURL=%URL%&error=%ERROR%&channelStatus=%CHANNE LSTATUS%&responseStatus=%RESPONSESTATUS%", 32 subscriptions_fallbackurl: "https://adblockplus.org/getSubscription?version=%V ERSION%&url=%SUBSCRIPTION%&downloadURL=%URL%&error=%ERROR%&channelStatus=%CHANNE LSTATUS%&responseStatus=%RESPONSESTATUS%",
33 subscriptions_autoupdate: true, 33 subscriptions_autoupdate: true,
34 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/excep tionrules.txt", 34 subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/excep tionrules.txt",
35 documentation_link: "https://adblockplus.org/redirect?link=%LINK%&lang=%LANG%" , 35 documentation_link: "https://adblockplus.org/redirect?link=%LINK%&lang=%LANG%" ,
36 update_url_release: "https://updates.adblockplus.org/%NAME%/update.json", 36 update_url_release: "https://updates.adblockplus.org/%NAME%/update.json?id=%ID %&version=%VERSION%&app=%APP%&type=%TYPE%",
37 update_url_devbuild: "https://adblockplus.org/devbuilds/%s/update.json", 37 update_url_devbuild: "https://adblockplus.org/devbuilds/%s/update.json?id=%ID% &version=%VERSION%&app=%APP%&type=%TYPE%",
38 last_update: 0 38 next_update_check: 0
39 }; 39 };
40 40
41 let values = Object.create(defaults); 41 let values = Object.create(defaults);
42 let path = _fileSystem.resolve("prefs.json"); 42 let path = _fileSystem.resolve("prefs.json");
43 let listeners = []; 43 let listeners = [];
44 let isDirty = false; 44 let isDirty = false;
45 let isSaving = false; 45 let isSaving = false;
46 46
47 function defineProperty(key) 47 function defineProperty(key)
48 { 48 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 let index = listeners.indexOf(listener); 118 let index = listeners.indexOf(listener);
119 if (index >= 0) 119 if (index >= 0)
120 listeners.splice(index, 1); 120 listeners.splice(index, 1);
121 }, 121 },
122 }; 122 };
123 123
124 for (let key in defaults) 124 for (let key in defaults)
125 defineProperty(key); 125 defineProperty(key);
126 126
127 load(); 127 load();
OLDNEW
« no previous file with comments | « lib/api.js ('k') | lib/updater.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld