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

Side by Side Diff: lib/init.js

Issue 5653480979038208: Issue 2325 - Add a way to set settings in libadblockplus for FRP and automatic updates (Closed)
Patch Set: Added a unit test. Changed the global object injection routine. Created June 10, 2015, 8:42 a.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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 if (prefsInitDone && filtersInitDone) 26 if (prefsInitDone && filtersInitDone)
27 { 27 {
28 checkInitialized = function() {}; 28 checkInitialized = function() {};
29 _triggerEvent("init", require("filterStorage").FilterStorage.firstRun); 29 _triggerEvent("init", require("filterStorage").FilterStorage.firstRun);
30 } 30 }
31 } 31 }
32 32
33 Prefs._initListener = function() 33 Prefs._initListener = function()
34 { 34 {
35 prefsInitDone = true; 35 prefsInitDone = true;
36
Eric 2015/06/10 17:48:16 Nit: no need for blank line.
Oleksandr 2015/06/12 10:47:57 Done.
36 checkInitialized(); 37 checkInitialized();
37 }; 38 };
38 39
39 FilterNotifier.addListener(function(action) 40 FilterNotifier.addListener(function(action)
40 { 41 {
41 if (action === "load") 42 if (action === "load")
42 { 43 {
43 let {FilterStorage} = require("filterStorage"); 44 let {FilterStorage} = require("filterStorage");
44 if (FilterStorage.firstRun) 45 if (FilterStorage.firstRun)
45 { 46 {
(...skipping 17 matching lines...) Expand all
63 subscription.homepage = node.homepage; 64 subscription.homepage = node.homepage;
64 if (subscription instanceof DownloadableSubscription && !subscription.la stDownload) 65 if (subscription instanceof DownloadableSubscription && !subscription.la stDownload)
65 Synchronizer.execute(subscription); 66 Synchronizer.execute(subscription);
66 } 67 }
67 } 68 }
68 69
69 filtersInitDone = true; 70 filtersInitDone = true;
70 checkInitialized(); 71 checkInitialized();
71 } 72 }
72 }); 73 });
OLDNEW

Powered by Google App Engine
This is Rietveld