| OLD | NEW | 
|---|
| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 113    * @type Function | 113    * @type Function | 
| 114    */ | 114    */ | 
| 115   onDownloadError: null, | 115   onDownloadError: null, | 
| 116 | 116 | 
| 117   /** | 117   /** | 
| 118    * Checks whether anything needs downloading. | 118    * Checks whether anything needs downloading. | 
| 119    */ | 119    */ | 
| 120   _doCheck: function() | 120   _doCheck: function() | 
| 121   { | 121   { | 
| 122     let now = Date.now(); | 122     let now = Date.now(); | 
| 123     for each (let downloadable in this.dataSource()) | 123     for (let downloadable of this.dataSource()) | 
| 124     { | 124     { | 
| 125       if (downloadable.lastCheck && now - downloadable.lastCheck > this.maxAbsen
     ceInterval) | 125       if (downloadable.lastCheck && now - downloadable.lastCheck > this.maxAbsen
     ceInterval) | 
| 126       { | 126       { | 
| 127         // No checks for a long time interval - user must have been offline, e.g
     . | 127         // No checks for a long time interval - user must have been offline, e.g
     . | 
| 128         // during a weekend. Increase soft expiration to prevent load peaks on t
     he | 128         // during a weekend. Increase soft expiration to prevent load peaks on t
     he | 
| 129         // server. | 129         // server. | 
| 130         downloadable.softExpiration += now - downloadable.lastCheck; | 130         downloadable.softExpiration += now - downloadable.lastCheck; | 
| 131       } | 131       } | 
| 132       downloadable.lastCheck = now; | 132       downloadable.lastCheck = now; | 
| 133 | 133 | 
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 372    * @type Integer | 372    * @type Integer | 
| 373    */ | 373    */ | 
| 374   softExpiration: 0, | 374   softExpiration: 0, | 
| 375 | 375 | 
| 376   /** | 376   /** | 
| 377    * Hard expiration interval, this is fixed. | 377    * Hard expiration interval, this is fixed. | 
| 378    * @type Integer | 378    * @type Integer | 
| 379    */ | 379    */ | 
| 380   hardExpiration: 0, | 380   hardExpiration: 0, | 
| 381 }; | 381 }; | 
| OLD | NEW | 
|---|