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

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

Issue 2487373003: Disable background video track behind a feature flag (Closed)
Patch Set: Rebase + comment fix 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e19736a7ecbf312614899a577d0d931039449b59..856e6cb074073504cbc4f1fbf0544ac3443e2a76 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -80,6 +80,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/url_util.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -526,6 +527,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,
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698