Class WebEngineSupportTable
CC-DESIGN-WEBVIEW-WARNING sections 5.1 and 5.2, work order CC-WEBENGINE-CLASSIFIER). Immutable once built.Only data, never text. The table carries versions, dates and source notes; nothing in it is ever shown to an end user, so a table from an override file or an online refresh cannot put a URL or a sentence in front of anyone.
Bounds on load (section 5.1). A table is rejected WHOLE, with one WARNING, when: its format is not 1; a Chrome major (a firstStable key or an Android lastMajor) is outside 50..999; a date is before 2008-09-02 (Chrome's first release) or more than 60 days after today; it has more than 500 entries in all; the first-stable dates go backwards as the major grows; an iOS status is unknown; a required member is missing or has the wrong type; or the file is larger than 262144 bytes. Members not named here are ignored.
Sources, in precedence (section 5.2, load(Path,Path,LocalDate)):
- the admin override file, the whole table;
- the online cache, for
chromium.firstStableonly, over the bundled Android and iOS facts, unless itsasOfday is before the bundled table's: a cache older than the table the server was built with is skipped with one INFO line (CC-WEBENGINE-REFRESH); - the bundled resource "webengine-support.json" of this package.
EMPTY, and the classifier then calls every engine PATCHED or NOT_ASSESSED (fail-open)."Today" is a parameter everywhere: nothing here reads a clock.
- Author:
- Christopher Mindus
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAn Android version that no longer receives a patched engine.static final recordOne iOS major.static enumThe state of an iOS major.Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WebEngineSupportTableThe table with no data at all.static final intThe table format this class reads.static final intThe largest table file read, in bytes.static final intThe most entries accepted, all sections together.static final intHow many days after today a date may lie.static final intThe largest Chrome major accepted.static final LocalDateThe earliest date accepted: Chrome's first release.static final intThe smallest Chrome major accepted.static final StringThe bundled table, a resource beside this class.Method Summary
Modifier and TypeMethodDescriptionGets the ended Android versions.getAsOf()Gets the table'sasOfday, so that a stale table is visible.Gets the first-stable days of the Chrome majors.Gets the iOS majors.Gets the oldest Android version still given new engines.Gets where the table came from.static WebEngineSupportTableLoads the table from its sources in precedence (section 5.2): the override file whole, else the bundled table with the Chromium dates of the cache file when that loads and is not older than the bundled table, else the bundled table alone, elseEMPTY.static WebEngineSupportTableloadBundled(LocalDate today) Loads the bundled table, the resource "webengine-support.json" beside this class.static WebEngineSupportTableParses a whole table and applies every bound.toString()The source, theasOfday and the entry counts.
Field Details
FORMAT
public static final int FORMATThe table format this class reads.- See Also:
RESOURCE
MIN_MAJOR
public static final int MIN_MAJORThe smallest Chrome major accepted.- See Also:
MAX_MAJOR
public static final int MAX_MAJORThe largest Chrome major accepted.- See Also:
MAX_ENTRIES
public static final int MAX_ENTRIESThe most entries accepted, all sections together.- See Also:
MAX_FUTURE_DAYS
public static final int MAX_FUTURE_DAYSHow many days after today a date may lie.- See Also:
MAX_BYTES
public static final int MAX_BYTESThe largest table file read, in bytes.- See Also:
MIN_DATE
The earliest date accepted: Chrome's first release.EMPTY
The table with no data at all.
Method Details
getSource
Gets where the table came from.- Returns:
- "bundled", "override <file>", "bundled + cache <file>" or "none".
getAsOf
getMinSupportedAndroid
Gets the oldest Android version still given new engines.- Returns:
- E.g. "10", or null when not known.
getAndroidEnded
Gets the ended Android versions.- Returns:
- The read-only map by Android major.
getFirstStable
Gets the first-stable days of the Chrome majors.- Returns:
- The read-only map by major.
getIOSMajors
Gets the iOS majors.- Returns:
- The read-only map by iOS major.
toString
load
Loads the table from its sources in precedence (section 5.2): the override file whole, else the bundled table with the Chromium dates of the cache file when that loads and is not older than the bundled table, else the bundled table alone, elseEMPTY. Never throws: every failure is one WARNING and the next source; an older cache is one INFO line.- Parameters:
overrideFile- The admin override file ($webEngine.dataFile), or null for none.cacheFile- The online cache file, or null for none. An absent file is not an error: no refresh has run yet.today- Today, for the date bound.- Returns:
- The table, never null.
loadBundled
Loads the bundled table, the resource "webengine-support.json" beside this class.- Parameters:
today- Today, for the date bound.- Returns:
- The table, or
EMPTYwith one WARNING when the resource is missing or fails its bounds.
parse
Parses a whole table and applies every bound.- Parameters:
json- The table text.today- Today, for the date bound.source- Where it came from, forgetSource().- Returns:
- The table.
- Throws:
IllegalArgumentException- If the text is not a table in format 1 or fails a bound; the message says which.