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

Side by Side Diff: lib/updater.js

Issue 29481653: Issue 5378 - Stop using of jshydra in libadblockplus (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 6, 2017, 1:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« lib/io.js ('K') | « lib/io.js ('k') | 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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 let url = updateUrl.replace(/%TYPE%/g, forceCheck ? TYPE_MANUAL : TYPE_AUTOMAT IC); 43 let url = updateUrl.replace(/%TYPE%/g, forceCheck ? TYPE_MANUAL : TYPE_AUTOMAT IC);
44 let downloadable = new Downloadable(url); 44 let downloadable = new Downloadable(url);
45 downloadable.lastError = Prefs.update_last_error; 45 downloadable.lastError = Prefs.update_last_error;
46 downloadable.lastCheck = Prefs.update_last_check; 46 downloadable.lastCheck = Prefs.update_last_check;
47 downloadable.softExpiration = Prefs.update_soft_expiration; 47 downloadable.softExpiration = Prefs.update_soft_expiration;
48 downloadable.hardExpiration = Prefs.update_hard_expiration; 48 downloadable.hardExpiration = Prefs.update_hard_expiration;
49 return downloadable; 49 return downloadable;
50 } 50 }
51 51
52 function getDownloadables() 52 function* getDownloadables()
53 { 53 {
54 yield getDownloadable(false); 54 yield getDownloadable(false);
55 } 55 }
56 56
57 function onExpirationChange(downloadable) 57 function onExpirationChange(downloadable)
58 { 58 {
59 Prefs.update_last_check = downloadable.lastCheck; 59 Prefs.update_last_check = downloadable.lastCheck;
60 Prefs.update_soft_expiration = downloadable.softExpiration; 60 Prefs.update_soft_expiration = downloadable.softExpiration;
61 Prefs.update_hard_expiration = downloadable.hardExpiration; 61 Prefs.update_hard_expiration = downloadable.hardExpiration;
62 } 62 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (callback) 100 if (callback)
101 callback(error); 101 callback(error);
102 callback = null; 102 callback = null;
103 } 103 }
104 104
105 let checkForUpdates = exports.checkForUpdates = function checkForUpdates(_callba ck) 105 let checkForUpdates = exports.checkForUpdates = function checkForUpdates(_callba ck)
106 { 106 {
107 callback = _callback; 107 callback = _callback;
108 downloader.download(getDownloadable(true)); 108 downloader.download(getDownloadable(true));
109 } 109 }
OLDNEW
« lib/io.js ('K') | « lib/io.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld