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

Side by Side Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java

Issue 29453623: Noissue - Project cleanup (Closed)
Patch Set: Created June 1, 2017, 1:45 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
« no previous file with comments | « adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/EngineService.java ('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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 import android.util.Log; 47 import android.util.Log;
48 48
49 /** 49 /**
50 * Simple subscription representation. 50 * Simple subscription representation.
51 */ 51 */
52 final class Subscription 52 final class Subscription
53 { 53 {
54 private static final String TAG = Subscription.class.getSimpleName(); 54 private static final String TAG = Subscription.class.getSimpleName();
55 public static final String KEY_TITLE = "title"; 55 public static final String KEY_TITLE = "title";
56 public static final String KEY_VERSION = "version"; 56 public static final String KEY_VERSION = "version";
57 public static final String KEY_FORCED_TITLE = "_title";
58 public static final String KEY_HTTP_ETAG = "_etag"; 57 public static final String KEY_HTTP_ETAG = "_etag";
59 public static final String KEY_HTTP_LAST_MODIFIED = "_last_modified"; 58 public static final String KEY_HTTP_LAST_MODIFIED = "_last_modified";
60 public static final String KEY_UPDATE_TIMESTAMP = "_update_timestamp"; 59 public static final String KEY_UPDATE_TIMESTAMP = "_update_timestamp";
61 public static final String KEY_TRIED_UPDATE_TIMESTAMP = "_tried_update_timesta mp"; 60 public static final String KEY_TRIED_UPDATE_TIMESTAMP = "_tried_update_timesta mp";
62 public static final String KEY_DOWNLOAD_COUNT = "_download_count"; 61 public static final String KEY_DOWNLOAD_COUNT = "_download_count";
63 public static final String KEY_ENABLED = "_enabled"; 62 public static final String KEY_ENABLED = "_enabled";
64 public static final String KEY_HAS_FILTERS = "_has_filters";
65 public static final String KEY_META_HASH = "_meta_hash"; 63 public static final String KEY_META_HASH = "_meta_hash";
66 64
67 public static final long MINIMAL_DOWNLOAD_INTERVAL = Engine.MILLIS_PER_HOUR / 4; 65 public static final long MINIMAL_DOWNLOAD_INTERVAL = Engine.MILLIS_PER_HOUR / 4;
68 public static final long DOWNLOAD_RETRY_INTERVAL = Engine.MILLIS_PER_HOUR; 66 public static final long DOWNLOAD_RETRY_INTERVAL = Engine.MILLIS_PER_HOUR;
69 67
70 private static final HashSet<String> ALLOWED_META_KEYS = new HashSet<>(); 68 private static final HashSet<String> ALLOWED_META_KEYS = new HashSet<>();
71 private static final Locale LOCALE_EN = Locale.ENGLISH; 69 private static final Locale LOCALE_EN = Locale.ENGLISH;
72 70
73 private final long updateInterval = Engine.MILLIS_PER_DAY 71 private final long updateInterval = Engine.MILLIS_PER_DAY
74 + (long) (Engine.MILLIS_PER_HOUR * 8. * Math.random()); 72 + (long) (Engine.MILLIS_PER_HOUR * 8. * Math.random());
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 this.serializeMetaData(metaFile); 605 this.serializeMetaData(metaFile);
608 if (filtersChanged) 606 if (filtersChanged)
609 { 607 {
610 this.serializeFilters(filtersFile); 608 this.serializeFilters(filtersFile);
611 this.clearFilters(); 609 this.clearFilters();
612 } 610 }
613 611
614 return filtersChanged; 612 return filtersChanged;
615 } 613 }
616 } 614 }
OLDNEW
« no previous file with comments | « adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/EngineService.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld