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

Side by Side Diff: lib/subscriptionInit.js

Issue 29759558: Issue 6599 - Hotfix to drop updated page everywhere (Closed)
Patch Set: Created April 23, 2018, 7:38 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
« no previous file with comments | « no previous file | no next file » | 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 <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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 subscriptions = subscriptionsCallback(subscriptions); 231 subscriptions = subscriptionsCallback(subscriptions);
232 232
233 for (let subscription of subscriptions) 233 for (let subscription of subscriptions)
234 { 234 {
235 FilterStorage.addSubscription(subscription); 235 FilterStorage.addSubscription(subscription);
236 if (subscription instanceof DownloadableSubscription && 236 if (subscription instanceof DownloadableSubscription &&
237 !subscription.lastDownload) 237 !subscription.lastDownload)
238 Synchronizer.execute(subscription); 238 Synchronizer.execute(subscription);
239 } 239 }
240 240
241 if (!Prefs.suppress_first_run_page) 241 if (!Prefs.suppress_first_run_page && firstRun)
242 { 242 {
243 let page = null; 243 browser.tabs.create({url: browser.extension.getURL("firstRun.html")});
244 if (firstRun)
245 {
246 page = "firstRun.html";
247 }
248 // For now we're limiting the updates page to users of
249 // Chromium-based browsers to gage its impact
250 else if (info.platform == "chromium" &&
251 updatesVersion > Prefs.last_updates_page_displayed)
Sebastian Noack 2018/04/23 19:17:06 Nit: Please also remove the now unused import of u
252 {
253 page = "updates.html";
254 }
255
256 if (page)
257 {
258 browser.tabs.create({url: browser.extension.getURL(page)});
259
260 // For new users and users that have already seen this updates page we
261 // want to avoid showing it again for subsequent updates.
262 Prefs.last_updates_page_displayed = updatesVersion;
263 }
264 } 244 }
265 245
266 initNotifications(); 246 initNotifications();
267 } 247 }
268 248
269 Promise.all([FilterNotifier.once("load"), 249 Promise.all([FilterNotifier.once("load"),
270 Prefs.untilLoaded]).then(detectFirstRun) 250 Prefs.untilLoaded]).then(detectFirstRun)
271 .then(getSubscriptions) 251 .then(getSubscriptions)
272 .then(finishInitialization); 252 .then(finishInitialization);
273 253
(...skipping 10 matching lines...) Expand all
284 * Sets a callback that is called with an array of subscriptions to be added 264 * Sets a callback that is called with an array of subscriptions to be added
285 * during initialization. The callback must return an array of subscriptions 265 * during initialization. The callback must return an array of subscriptions
286 * that will effectively be added. 266 * that will effectively be added.
287 * 267 *
288 * @param {function} callback 268 * @param {function} callback
289 */ 269 */
290 exports.setSubscriptionsCallback = callback => 270 exports.setSubscriptionsCallback = callback =>
291 { 271 {
292 subscriptionsCallback = callback; 272 subscriptionsCallback = callback;
293 }; 273 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld