Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Issue 1381613003: Defer media loading while on cellular networks. (Closed)

Created:
5 years, 2 months ago by DaleCurtis
Modified:
5 years, 2 months ago
CC:
chromium-reviews, blink-reviews-html_chromium.org, mlamouri+watch-blink_chromium.org, philipj_slow, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, nessy, jkarlin+watch_chromium.org, blink-reviews, vcarbune.chromium, loading-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Defer media loading while on cellular networks. We only populate networkStateNotifier()'s connectionType() field on a couple platforms, see http://crbug.com/368358 for details, but it does work on Android at least. This prevents us from wasting bandwidth on videos when the device is on a cellular connection. BUG=516766 TEST=Load deferred when forced to true, tested on device. Committed: https://crrev.com/58b4584a73adad4572cceb9e062c7338482ba36a Cr-Commit-Position: refs/heads/master@{#355699}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address comments. #

Total comments: 13

Patch Set 3 : Comments. #

Patch Set 4 : Rebase. #

Messages

Total messages: 32 (10 generated)
DaleCurtis
(moved from WebKit checkout)
5 years, 2 months ago (2015-09-30 16:17:59 UTC) #2
philipj_slow
Some thoughts on how to best test this. If it's possible to simply write this ...
5 years, 2 months ago (2015-10-01 09:24:07 UTC) #3
philipj_slow
https://codereview.chromium.org/1381613003/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1381613003/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1967 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1967: if (networkStateNotifier().connectionType() == WebConnectionTypeCellular) On 2015/10/01 09:24:07, philipj wrote: ...
5 years, 2 months ago (2015-10-01 09:49:49 UTC) #4
DaleCurtis
Unfortunately, I'm heading OOO today, so I won't get back to this until Oct 16, ...
5 years, 2 months ago (2015-10-01 19:25:54 UTC) #5
DaleCurtis
Won't have time to get to these comments before heading OOO until the 16th, watk@ ...
5 years, 2 months ago (2015-10-01 20:16:28 UTC) #6
DaleCurtis
On 2015/10/01 20:16:28, DaleCurtis_OOO_Until_Oct_16 wrote: > Won't have time to get to these comments before ...
5 years, 2 months ago (2015-10-01 20:16:39 UTC) #7
DaleCurtis
https://codereview.chromium.org/1381613003/diff/1/third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html File third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html (right): https://codereview.chromium.org/1381613003/diff/1/third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html#newcode4 third_party/WebKit/LayoutTests/media/video-preload-default-cellular.html:4: /* Use a black background to see failures; the ...
5 years, 2 months ago (2015-10-20 21:56:51 UTC) #8
philipj_slow
Media bits LGTM with nits, but I'd like jkarlin@ to take a second look at ...
5 years, 2 months ago (2015-10-21 11:11:29 UTC) #10
jkarlin
https://codereview.chromium.org/1381613003/diff/20001/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp File third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp (right): https://codereview.chromium.org/1381613003/diff/20001/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp#newcode108 third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp:108: // Reset state to default when entering or leaving ...
5 years, 2 months ago (2015-10-21 13:24:50 UTC) #11
DaleCurtis
+rkaplow for histograms.xml https://codereview.chromium.org/1381613003/diff/20001/third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js File third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js (right): https://codereview.chromium.org/1381613003/diff/20001/third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js#newcode1 third_party/WebKit/LayoutTests/media/video-preload-cellular-test.js:1: function CellularPreloadTest(preloadType) { On 2015/10/21 11:11:29, ...
5 years, 2 months ago (2015-10-21 22:34:32 UTC) #13
philipj_slow
Even more LGTM :)
5 years, 2 months ago (2015-10-22 07:08:10 UTC) #15
Yoav Weiss
I have to say that I'm ambivalent about this change, since we're using network type ...
5 years, 2 months ago (2015-10-22 08:23:31 UTC) #16
rkaplow
lgtm histograms lgtm
5 years, 2 months ago (2015-10-22 15:10:11 UTC) #17
jkarlin
NetworkStateNotifier.* lgtm
5 years, 2 months ago (2015-10-22 15:25:45 UTC) #18
DaleCurtis
PSA sent, I'll CQ later today after a period for comments.
5 years, 2 months ago (2015-10-22 17:03:41 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1381613003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1381613003/40001
5 years, 2 months ago (2015-10-22 20:28:10 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/84966) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 2 months ago (2015-10-22 20:30:35 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1381613003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1381613003/60001
5 years, 2 months ago (2015-10-22 20:35:09 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/124633)
5 years, 2 months ago (2015-10-22 23:28:11 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1381613003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1381613003/60001
5 years, 2 months ago (2015-10-22 23:50:06 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 2 months ago (2015-10-23 01:20:18 UTC) #31
commit-bot: I haz the power
5 years, 2 months ago (2015-10-23 01:21:05 UTC) #32
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/58b4584a73adad4572cceb9e062c7338482ba36a
Cr-Commit-Position: refs/heads/master@{#355699}

Powered by Google App Engine
This is Rietveld 408576698