diff options
author | toyoshim <toyoshim@chromium.org> | 2015-12-17 20:11:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 04:12:19 +0000 |
commit | cfb26409da10af0fe7d7d576e185161724819783 (patch) | |
tree | d2f5c47dd1636f837b2335dec13186317a6aa1ed /components | |
parent | 29067ecc7b35d07bce918606240e1f1628ae1a06 (diff) | |
download | chromium_src-cfb26409da10af0fe7d7d576e185161724819783.zip chromium_src-cfb26409da10af0fe7d7d576e185161724819783.tar.gz chromium_src-cfb26409da10af0fe7d7d576e185161724819783.tar.bz2 |
Intervention: Web Font adaptive timeout on 2G network
This patch changes WebConnectionType to be a super set of the connection
type that Network Information API defines so that FontResource can
identify 2G cellular networks.
FontResource adjusts fallback timeout to 0sec on slow 2G networks.
This is the first step of the adaptive font timeouts proposal.
https://docs.google.com/document/d/12yQa0eMhGPO-DDhLb8FCg8ss-MTt8JkTFgEJyoM_4uQ/edit?usp=sharing
The feature is behind the experimental web platform feature flag as font-display is.
BUG=515343
Review URL: https://codereview.chromium.org/1463083003
Cr-Commit-Position: refs/heads/master@{#366012}
Diffstat (limited to 'components')
-rw-r--r-- | components/html_viewer/blink_settings_impl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/html_viewer/blink_settings_impl.cc b/components/html_viewer/blink_settings_impl.cc index a2b3180..e787861 100644 --- a/components/html_viewer/blink_settings_impl.cc +++ b/components/html_viewer/blink_settings_impl.cc @@ -50,9 +50,11 @@ blink::WebConnectionType NetConnectionTypeToWebConnectionType( case net::NetworkChangeNotifier::CONNECTION_NONE: return blink::WebConnectionTypeNone; case net::NetworkChangeNotifier::CONNECTION_2G: + return blink::WebConnectionTypeCellular2G; case net::NetworkChangeNotifier::CONNECTION_3G: + return blink::WebConnectionTypeCellular3G; case net::NetworkChangeNotifier::CONNECTION_4G: - return blink::WebConnectionTypeCellular; + return blink::WebConnectionTypeCellular4G; case net::NetworkChangeNotifier::CONNECTION_BLUETOOTH: return blink::WebConnectionTypeBluetooth; } |