| OLD | NEW |
| 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 20 matching lines...) Expand all Loading... |
| 31 import org.adblockplus.libadblockplus.AdblockPlusException; | 31 import org.adblockplus.libadblockplus.AdblockPlusException; |
| 32 import org.adblockplus.libadblockplus.FilterEngine; | 32 import org.adblockplus.libadblockplus.FilterEngine; |
| 33 import org.adblockplus.libadblockplus.HeaderEntry; | 33 import org.adblockplus.libadblockplus.HeaderEntry; |
| 34 import org.adblockplus.libadblockplus.JsValue; | 34 import org.adblockplus.libadblockplus.JsValue; |
| 35 import org.adblockplus.libadblockplus.ServerResponse; | 35 import org.adblockplus.libadblockplus.ServerResponse; |
| 36 import org.adblockplus.libadblockplus.ServerResponse.NsStatus; | 36 import org.adblockplus.libadblockplus.ServerResponse.NsStatus; |
| 37 import org.adblockplus.libadblockplus.WebRequest; | 37 import org.adblockplus.libadblockplus.WebRequest; |
| 38 | 38 |
| 39 import android.util.Log; | 39 import android.util.Log; |
| 40 | 40 |
| 41 public class AndroidWebRequest extends WebRequest | 41 public class AndroidWebRequest implements WebRequest |
| 42 { | 42 { |
| 43 protected static final String ENCODING_GZIP = "gzip"; | 43 protected static final String ENCODING_GZIP = "gzip"; |
| 44 protected static final String ENCODING_IDENTITY = "identity"; | 44 protected static final String ENCODING_IDENTITY = "identity"; |
| 45 | 45 |
| 46 public final static String TAG = Utils.getTag(WebRequest.class); | 46 public final static String TAG = Utils.getTag(WebRequest.class); |
| 47 | 47 |
| 48 private final HashSet<String> subscriptionURLs = new HashSet<String>(); | 48 private final HashSet<String> subscriptionURLs = new HashSet<String>(); |
| 49 private final boolean elemhideEnabled; | 49 private final boolean elemhideEnabled; |
| 50 private final boolean compressedStream; | 50 private final boolean compressedStream; |
| 51 | 51 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 Log.d(TAG, "Downloading finished"); | 184 Log.d(TAG, "Downloading finished"); |
| 185 return response; | 185 return response; |
| 186 } | 186 } |
| 187 catch (final Throwable t) | 187 catch (final Throwable t) |
| 188 { | 188 { |
| 189 Log.e(TAG, "WebRequest failed", t); | 189 Log.e(TAG, "WebRequest failed", t); |
| 190 throw new AdblockPlusException("WebRequest failed", t); | 190 throw new AdblockPlusException("WebRequest failed", t); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 } | 193 } |
| OLD | NEW |