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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2487373003: Disable background video track behind a feature flag (Closed)
Patch Set: Added the feature flag to histograms.xml Created 4 years, 1 month 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: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index a0f34b66f7d98c3db9ead41896275692cb19d157..8dedbf24423df912cd92606ba771bed1bb4e220f 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -81,6 +81,7 @@
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
+#include "media/base/media_switches.h"
#include "net/base/filename_util.h"
#include "net/base/url_util.h"
#include "net/url_request/url_request_context_getter.h"
@@ -584,6 +585,9 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
if (delegate_ && delegate_->HideDownloadUI())
prefs.hide_download_ui = true;
+ prefs.background_video_track_optimization_enabled =
+ base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization);
+
std::map<std::string, std::string> expensive_background_throttling_prefs;
variations::GetVariationParamsByFeature(
features::kExpensiveBackgroundTimerThrottling,

Powered by Google App Engine
This is Rietveld 408576698