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

Delta Between Two Patch Sets: background.js

Issue 6468765319430144: Issue 417 - Reinitializing removed filter lists (Platform) (Closed)
Left Patch Set: Moved check out of Core code Created May 26, 2014, 5:43 p.m.
Right Patch Set: Fixed: Message also appeared on first-run Created May 27, 2014, 12:07 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/filesystem/io.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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 require("filterNotifier").FilterNotifier.addListener(function(action) 58 require("filterNotifier").FilterNotifier.addListener(function(action)
59 { 59 {
60 if (action == "load") 60 if (action == "load")
61 { 61 {
62 var importingOldData = importOldData(); 62 var importingOldData = importOldData();
63 63
64 var addonVersion = require("info").addonVersion; 64 var addonVersion = require("info").addonVersion;
65 var prevVersion = ext.storage.currentVersion; 65 var prevVersion = ext.storage.currentVersion;
66 66
67 // There are no filters stored so we need to reinitialize all filterlists 67 // There are no filters stored so we need to reinitialize all filterlists
68 if (FilterStorage.subscriptions.length === 0) 68 if (!FilterStorage.firstRun && FilterStorage.subscriptions.length === 0)
69 { 69 {
70 filterlistsReinitialized = true; 70 filterlistsReinitialized = true;
71 prevVersion = null; 71 prevVersion = null;
72 } 72 }
73 73
74 if (prevVersion != addonVersion || FilterStorage.firstRun) 74 if (prevVersion != addonVersion || FilterStorage.firstRun)
75 { 75 {
76 seenDataCorruption = prevVersion && FilterStorage.firstRun; 76 seenDataCorruption = prevVersion && FilterStorage.firstRun;
77 ext.storage.currentVersion = addonVersion; 77 ext.storage.currentVersion = addonVersion;
78 if (!importingOldData) 78 if (!importingOldData)
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 page.sendMessage({type: "clickhide-deactivate"}); 607 page.sendMessage({type: "clickhide-deactivate"});
608 refreshIconAndContextMenu(page); 608 refreshIconAndContextMenu(page);
609 }); 609 });
610 610
611 setTimeout(function() 611 setTimeout(function()
612 { 612 {
613 var notificationToShow = Notification.getNextToShow(); 613 var notificationToShow = Notification.getNextToShow();
614 if (notificationToShow) 614 if (notificationToShow)
615 showNotification(notificationToShow); 615 showNotification(notificationToShow);
616 }, 3 * 60 * 1000); 616 }, 3 * 60 * 1000);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld