| Left: | ||
| Right: |
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 private Context context; | 77 private Context context; |
| 78 private WebRequest request; | 78 private WebRequest request; |
| 79 private Map<String, Integer> urlToResourceIdMap; | 79 private Map<String, Integer> urlToResourceIdMap; |
| 80 private Storage storage; | 80 private Storage storage; |
| 81 private Listener listener; | 81 private Listener listener; |
| 82 | 82 |
| 83 /** | 83 /** |
| 84 * Constructor | 84 * Constructor |
| 85 * @param context android context | 85 * @param context android context |
| 86 * @param request wrapped request to perform the request if it's not preloaded subscription requested | 86 * @param request wrapped request to perform the request if it's not preloaded subscription requested |
| 87 * @param urlToResourceIdMap map URL -> android resource id for preloaded subs criptions | 87 * @param urlToResourceIdMap map URL android resource id for preloaded subscri ptions |
|
diegocarloslima
2018/07/09 16:01:01
Needed to remove the `->` due to an error while ru
anton
2018/07/10 09:51:39
map URL _to_ android resource id ...
This looks li
jens
2018/07/10 10:08:10
the word "to" is missing.
diegocarloslima
2018/07/10 12:26:02
I will add the `to` word
| |
| 88 * See AndroidWebRequestResourceWrapper.EASYLIST_... constants | 88 * See AndroidWebRequestResourceWrapper.EASYLIST_... constants |
| 89 * @param storage Storage impl to remember served interceptions | 89 * @param storage Storage impl to remember served interceptions |
| 90 */ | 90 */ |
| 91 public AndroidWebRequestResourceWrapper(Context context, WebRequest request, | 91 public AndroidWebRequestResourceWrapper(Context context, WebRequest request, |
| 92 Map<String, Integer> urlToResourceIdMa p, | 92 Map<String, Integer> urlToResourceIdMa p, |
| 93 Storage storage) | 93 Storage storage) |
| 94 { | 94 { |
| 95 this.context = context; | 95 this.context = context; |
| 96 this.request = request; | 96 this.request = request; |
| 97 this.urlToResourceIdMap = Collections.synchronizedMap(urlToResourceIdMap); | 97 this.urlToResourceIdMap = Collections.synchronizedMap(urlToResourceIdMap); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 .commit(); | 240 .commit(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 @Override | 243 @Override |
| 244 public synchronized boolean contains(String url) | 244 public synchronized boolean contains(String url) |
| 245 { | 245 { |
| 246 return urls.contains(url); | 246 return urls.contains(url); |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 } | 249 } |
| OLD | NEW |