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

Side by Side Diff: messageResponder.js

Issue 29339651: Issue 3915 - Avoid listing special subscriptions (Closed)
Patch Set: Avoid listing special subscriptions Created April 13, 2016, 8:03 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 | options.js » ('j') | options.js » ('J')
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-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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (key in obj) 65 if (key in obj)
66 result[key] = obj[key]; 66 result[key] = obj[key];
67 } 67 }
68 return result; 68 return result;
69 } 69 }
70 70
71 function convertSubscription(subscription) 71 function convertSubscription(subscription)
72 { 72 {
73 var obj = convertObject(["disabled", "downloadStatus", "homepage", 73 var obj = convertObject(["disabled", "downloadStatus", "homepage",
74 "lastDownload", "title", "url"], subscription); 74 "lastDownload", "title", "url"], subscription);
75 obj.isSpecial = subscription instanceof SpecialSubscription;
76 obj.isDownloadable = subscription instanceof DownloadableSubscription;
75 obj.isDownloading = Synchronizer.isExecuting(subscription.url); 77 obj.isDownloading = Synchronizer.isExecuting(subscription.url);
76 return obj; 78 return obj;
77 } 79 }
78 80
79 var convertFilter = convertObject.bind(null, ["text"]); 81 var convertFilter = convertObject.bind(null, ["text"]);
80 82
81 var changeListeners = new global.ext.PageMap(); 83 var changeListeners = new global.ext.PageMap();
82 var listenedPreferences = Object.create(null); 84 var listenedPreferences = Object.create(null);
83 var listenedFilterChanges = Object.create(null); 85 var listenedFilterChanges = Object.create(null);
84 var messageTypes = { 86 var messageTypes = {
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 for (var i = 0; i < subscriptions.length; i++) 404 for (var i = 0; i < subscriptions.length; i++)
403 { 405 {
404 var subscription = subscriptions[i]; 406 var subscription = subscriptions[i];
405 if (subscription instanceof DownloadableSubscription) 407 if (subscription instanceof DownloadableSubscription)
406 Synchronizer.execute(subscription, true); 408 Synchronizer.execute(subscription, true);
407 } 409 }
408 break; 410 break;
409 } 411 }
410 }); 412 });
411 })(this); 413 })(this);
OLDNEW
« no previous file with comments | « no previous file | options.js » ('j') | options.js » ('J')

Powered by Google App Engine
This is Rietveld