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

Delta Between Two Patch Sets: lib/init.js

Issue 29363607: Issue 4612 - enable AA on first run and make automatic adding of any subscription optional (Closed)
Left Patch Set: address comments Created Nov. 22, 2016, 12:22 p.m.
Right Patch Set: reduce number of attempts to remove test files Created Dec. 2, 2016, 2:15 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 | « no previous file | lib/prefs.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 let {Prefs} = require("prefs"); 51 let {Prefs} = require("prefs");
52 let {Utils} = require("utils"); 52 let {Utils} = require("utils");
53 53
54 if (Prefs.first_run_subscription_auto_select) 54 if (Prefs.first_run_subscription_auto_select)
55 { 55 {
56 let subscriptions = require("subscriptions.xml"); 56 let subscriptions = require("subscriptions.xml");
57 let node = Utils.chooseFilterSubscription(subscriptions); 57 let node = Utils.chooseFilterSubscription(subscriptions);
58 if (node) 58 if (node)
59 { 59 {
60 let subscription = Subscription.fromURL(node.url); 60 let subscription = Subscription.fromURL(node.url);
61 FilterStorage.addSubscription(subscription);
Felix Dahlke 2016/11/22 17:37:16 Nit: Seems we do this after setting the subscripti
sergei 2016/11/23 14:20:50 Completely agree, fixed.
62 subscription.disabled = false; 61 subscription.disabled = false;
63 subscription.title = node.title; 62 subscription.title = node.title;
64 subscription.homepage = node.homepage; 63 subscription.homepage = node.homepage;
64 FilterStorage.addSubscription(subscription);
65 if (subscription instanceof DownloadableSubscription && !subscription. lastDownload) 65 if (subscription instanceof DownloadableSubscription && !subscription. lastDownload)
66 Synchronizer.execute(subscription); 66 Synchronizer.execute(subscription);
67 } 67 }
68
68 let aaSubscription = Subscription.fromURL(Prefs.subscriptions_exceptions url); 69 let aaSubscription = Subscription.fromURL(Prefs.subscriptions_exceptions url);
Felix Dahlke 2016/11/22 17:37:16 Nit: Mind adding an empty line above this to separ
sergei 2016/11/23 14:20:50 Done.
70 aaSubscription.disabled = false;
69 FilterStorage.addSubscription(aaSubscription); 71 FilterStorage.addSubscription(aaSubscription);
70 aaSubscription.disabled = false;
71 if (aaSubscription instanceof DownloadableSubscription && !aaSubscriptio n.lastDownload) 72 if (aaSubscription instanceof DownloadableSubscription && !aaSubscriptio n.lastDownload)
72 Synchronizer.execute(aaSubscription); 73 Synchronizer.execute(aaSubscription);
73 } 74 }
74 } 75 }
75 76
76 filtersInitDone = true; 77 filtersInitDone = true;
77 checkInitialized(); 78 checkInitialized();
78 } 79 }
79 }); 80 });
LEFTRIGHT
« no previous file | lib/prefs.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld