From cfb26409da10af0fe7d7d576e185161724819783 Mon Sep 17 00:00:00 2001 From: toyoshim Date: Thu, 17 Dec 2015 20:11:36 -0800 Subject: 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} --- components/html_viewer/blink_settings_impl.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'components') 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; } -- cgit v1.1