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

Delta Between Two Patch Sets: messageResponder.js

Issue 29339651: Issue 3915 - Avoid listing special subscriptions (Closed)
Left Patch Set: Created April 12, 2016, 12:09 p.m.
Right 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « 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')
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 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.special = subscription instanceof SpecialSubscription; 75 obj.isSpecial = subscription instanceof SpecialSubscription;
Sebastian Noack 2016/04/12 12:21:34 As suggest on the issue, we can already distinguis
76 obj.downloadable = subscription instanceof DownloadableSubscription; 76 obj.isDownloadable = subscription instanceof DownloadableSubscription;
77 obj.isDownloading = Synchronizer.isExecuting(subscription.url); 77 obj.isDownloading = Synchronizer.isExecuting(subscription.url);
78 return obj; 78 return obj;
79 } 79 }
80 80
81 var convertFilter = convertObject.bind(null, ["text"]); 81 var convertFilter = convertObject.bind(null, ["text"]);
82 82
83 var changeListeners = new global.ext.PageMap(); 83 var changeListeners = new global.ext.PageMap();
84 var listenedPreferences = Object.create(null); 84 var listenedPreferences = Object.create(null);
85 var listenedFilterChanges = Object.create(null); 85 var listenedFilterChanges = Object.create(null);
86 var messageTypes = { 86 var messageTypes = {
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 for (var i = 0; i < subscriptions.length; i++) 404 for (var i = 0; i < subscriptions.length; i++)
405 { 405 {
406 var subscription = subscriptions[i]; 406 var subscription = subscriptions[i];
407 if (subscription instanceof DownloadableSubscription) 407 if (subscription instanceof DownloadableSubscription)
408 Synchronizer.execute(subscription, true); 408 Synchronizer.execute(subscription, true);
409 } 409 }
410 break; 410 break;
411 } 411 }
412 }); 412 });
413 })(this); 413 })(this);
LEFTRIGHT
« no previous file | options.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld