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

Delta Between Two Patch Sets: lib/prefs.js

Issue 29713631: Issue 5760 - Use relative require paths (Closed)
Left Patch Set: Created March 3, 2018, 4:09 a.m.
Right Patch Set: Address PS4 comments, rebase Created April 5, 2018, 11:09 p.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
« no previous file with change/comment | « lib/popupBlocker.js ('k') | lib/requestBlocker.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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 { 333 {
334 for (let key in items) 334 for (let key in items)
335 overrides[keyToPref(key)] = items[key]; 335 overrides[keyToPref(key)] = items[key];
336 336
337 resolve(); 337 resolve();
338 }); 338 });
339 }); 339 });
340 340
341 let managedLoaded = new Promise(resolve => 341 let managedLoaded = new Promise(resolve =>
342 { 342 {
343 if (require("../buildtools/info").platform == "chromium" && 343 if ("managed" in browser.storage)
344 "managed" in browser.storage)
kzar 2018/03/19 21:50:08 Please fix the whitespace here, `"managed"` should
Jon Sonesen 2018/03/20 23:25:18 Acknowledged. Since rebase this require is not nee
345 { 344 {
346 browser.storage.managed.get(null, items => 345 browser.storage.managed.get(null, items =>
347 { 346 {
348 // Opera doesn't support browser.storage.managed, but instead simply 347 // Opera doesn't support browser.storage.managed, but instead simply
349 // removing the API, Opera sets browser.runtime.lastError when using it. 348 // removing the API, Opera sets browser.runtime.lastError when using it.
350 // So we have to retrieve that error, to prevent it from showing up 349 // So we have to retrieve that error, to prevent it from showing up
351 // in the console. 350 // in the console.
352 browser.runtime.lastError; 351 browser.runtime.lastError;
353 352
354 for (let key in items) 353 for (let key in items)
(...skipping 26 matching lines...) Expand all
381 eventEmitter.emit(pref); 380 eventEmitter.emit(pref);
382 } 381 }
383 } 382 }
384 }); 383 });
385 } 384 }
386 385
387 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded); 386 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded);
388 } 387 }
389 388
390 init(); 389 init();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld