Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| index 77aa5fe35409933471eb164bbb4b5be025ecc02e..f132a0780837869915ccc75b990ef7f1cce2d928 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| @@ -1908,8 +1908,9 @@ void HTMLMediaElement::setPreload(const AtomicString& preload) |
| WebMediaPlayer::Preload HTMLMediaElement::preloadType() const |
| { |
| - // Force preload to none for cellular connections. |
| - if (networkStateNotifier().connectionType() == WebConnectionTypeCellular) { |
| + // Force preload to none for cellular connections for online resources. |
|
philipj_slow
2015/12/16 14:39:05
I think the idea is right, but that modifying prel
Srirama
2015/12/16 14:54:12
Should we consider content:// (content providers i
philipj_slow
2015/12/16 15:25:31
Does that currently work with media elements? http
DaleCurtis
2015/12/17 00:02:19
There are a few different injectables AFAIK, WebVi
|
| + const bool isNetworkURL = m_currentSrc.protocolIsInHTTPFamily() || m_currentSrc.protocolIs("ftp"); |
| + if (isNetworkURL && networkStateNotifier().connectionType() == WebConnectionTypeCellular) { |
| UseCounter::count(document(), UseCounter::HTMLMediaElementPreloadForcedNone); |
| return WebMediaPlayer::PreloadNone; |
| } |