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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2881073003: Support DataSaver for SharedWorker (Closed)
Patch Set: fix #include "public/web/WebDataSaverFlag.h" Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 06b542b35315441d29edc68e7cd91fa9824c0c6f..7965bc76bc81d59a7af8716a8834d002b97cfd2f 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2181,7 +2181,8 @@ WebMediaPlayer::Preload HTMLMediaElement::PreloadType() const {
// If the source scheme is requires network, force preload to 'none' on Data
// Saver and for low end devices.
if (GetDocument().GetSettings() &&
- (GetDocument().GetSettings()->GetDataSaverEnabled() ||
+ (GetDocument().GetSettings()->GetDataSaverFlag() ==
+ WebDataSaverFlag::kEnabled ||
GetDocument().GetSettings()->GetForcePreloadNoneForMediaElements()) &&
(current_src_.Protocol() != "blob" && current_src_.Protocol() != "data" &&
current_src_.Protocol() != "file")) {

Powered by Google App Engine
This is Rietveld 408576698