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

Delta Between Two Patch Sets: lib/prefs.js

Issue 29338534: Issue 3826 - Filter preference change events (Closed)
Left Patch Set: Created March 17, 2016, 4:30 p.m.
Right Patch Set: Fixed some issues Created March 23, 2016, 11:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« lib/events.js ('K') | « lib/messaging.js ('k') | lib/stats.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 */ 176 */
177 defaults.additional_subscriptions = []; 177 defaults.additional_subscriptions = [];
178 178
179 /** 179 /**
180 * @namespace 180 * @namespace
181 * @static 181 * @static
182 */ 182 */
183 let Prefs = exports.Prefs = { 183 let Prefs = exports.Prefs = {
184 /** 184 /**
185 * Adds a callback that is called when the 185 * Adds a callback that is called when the
186 * value of the specified preference changed. 186 * value of a specified preference changed.
kzar 2016/03/18 15:49:59 Nit: Should be "a specified"
Sebastian Noack 2016/03/18 18:15:49 Done.
187 * 187 *
188 * @param {string} preference 188 * @param {string} preference
189 * @param {function} callback 189 * @param {function} callback
190 */ 190 */
191 on: function(preference, callback) 191 on: function(preference, callback)
192 { 192 {
193 eventEmitter.on(preference, callback); 193 eventEmitter.on(preference, callback);
194 }, 194 },
195 195
196 /** 196 /**
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 eventEmitter.emit(pref); 312 eventEmitter.emit(pref);
313 } 313 }
314 } 314 }
315 }); 315 });
316 } 316 }
317 317
318 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded); 318 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded);
319 } 319 }
320 320
321 init(); 321 init();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld