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

Side by Side Diff: lib/notification.js

Issue 4845439622840320: Issue 2659 - Reduce initial notification download delay to one minute (Closed)
Patch Set: Created June 8, 2015, 9:23 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-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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 /** 18 /**
19 * @fileOverview Handles notifications. 19 * @fileOverview Handles notifications.
20 */ 20 */
21 21
22 Cu.import("resource://gre/modules/Services.jsm"); 22 Cu.import("resource://gre/modules/Services.jsm");
23 23
24 let {Prefs} = require("prefs"); 24 let {Prefs} = require("prefs");
25 let {Downloader, Downloadable, MILLIS_IN_MINUTE, MILLIS_IN_HOUR, MILLIS_IN_DAY} = require("downloader"); 25 let {Downloader, Downloadable, MILLIS_IN_MINUTE, MILLIS_IN_HOUR, MILLIS_IN_DAY} = require("downloader");
26 let {Utils} = require("utils"); 26 let {Utils} = require("utils");
27 let {Matcher} = require("matcher"); 27 let {Matcher} = require("matcher");
28 let {Filter} = require("filterClasses"); 28 let {Filter} = require("filterClasses");
29 29
30 let INITIAL_DELAY = 12 * MILLIS_IN_MINUTE; 30 let INITIAL_DELAY = 1 * MILLIS_IN_MINUTE;
31 let CHECK_INTERVAL = 1 * MILLIS_IN_HOUR; 31 let CHECK_INTERVAL = 1 * MILLIS_IN_HOUR;
32 let EXPIRATION_INTERVAL = 1 * MILLIS_IN_DAY; 32 let EXPIRATION_INTERVAL = 1 * MILLIS_IN_DAY;
33 let TYPE = { 33 let TYPE = {
34 information: 0, 34 information: 0,
35 question: 1, 35 question: 1,
36 critical: 2 36 critical: 2
37 }; 37 };
38 38
39 let listeners = {}; 39 let listeners = {};
40 40
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 Prefs.notifications_showui = true; 352 Prefs.notifications_showui = true;
353 } 353 }
354 else if (index != -1 && forceValue !== true) 354 else if (index != -1 && forceValue !== true)
355 categories.splice(index, 1); 355 categories.splice(index, 1);
356 356
357 // HACK: JSON values aren't saved unless they are assigned a different objec t. 357 // HACK: JSON values aren't saved unless they are assigned a different objec t.
358 Prefs.notifications_ignoredcategories = JSON.parse(JSON.stringify(categories )); 358 Prefs.notifications_ignoredcategories = JSON.parse(JSON.stringify(categories ));
359 } 359 }
360 }; 360 };
361 Notification.init(); 361 Notification.init();
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