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

Delta Between Two Patch Sets: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Downloader.java

Issue 29673565: Issue 6066 - Implement 'force update' functionality for subscriptions (Closed)
Left Patch Set: Fixed typos and line length Created Jan. 19, 2018, 11:01 a.m.
Right Patch Set: Fixes Created Jan. 23, 2018, 3:12 p.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
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 try 161 try
162 { 162 {
163 if (!this.downloader.downloaderEnabled) 163 if (!this.downloader.downloaderEnabled)
164 { 164 {
165 Thread.sleep(30000); 165 Thread.sleep(30000);
166 continue; 166 continue;
167 } 167 }
168 job = this.downloader.downloadJobs.poll(5 * 60, TimeUnit.SECONDS); 168 job = this.downloader.downloadJobs.poll(5 * 60, TimeUnit.SECONDS);
169 if (job != null) 169 if (job != null)
170 { 170 {
171 if (this.downloader.engine.canUseInternet() || job.allowMetered) 171 if (this.downloader.engine.canUseInternet(job.allowMetered))
diegocarloslima 2018/01/19 13:59:00 I know that there's a check in MainPreferences whi
jens 2018/01/19 14:32:55 I was already considering to move canUseInternet t
172 { 172 {
173 Log.d(TAG, "Downloading '" + job.id + "' using " + job.url); 173 Log.d(TAG, "Downloading '" + job.id + "' using " + job.url);
174 download(job); 174 download(job);
175 Log.d(TAG, "Downloading '" + job.id + "' finished with response co de " 175 Log.d(TAG, "Downloading '" + job.id + "' finished with response co de "
176 + job.responseCode); 176 + job.responseCode);
177 this.downloader.lock(); 177 this.downloader.lock();
178 try 178 try
179 { 179 {
180 this.downloader.enqueuedIds.remove(job.id); 180 this.downloader.enqueuedIds.remove(job.id);
181 } 181 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 this.url = url; 255 this.url = url;
256 this.id = id; 256 this.id = id;
257 this.allowMetered = allowMetered; 257 this.allowMetered = allowMetered;
258 if (headers != null) 258 if (headers != null)
259 { 259 {
260 this.headers.putAll(headers); 260 this.headers.putAll(headers);
261 } 261 }
262 } 262 }
263 } 263 }
264 } 264 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld