| Index: content/browser/media/webrtc/webrtc_internals.cc
|
| diff --git a/content/browser/media/webrtc/webrtc_internals.cc b/content/browser/media/webrtc/webrtc_internals.cc
|
| index ae8a7edef50004c06b6816256e30b1159dbcc6a5..bdf7d0b0c65d8d66d4c6cc1b7191f631f00cb086 100644
|
| --- a/content/browser/media/webrtc/webrtc_internals.cc
|
| +++ b/content/browser/media/webrtc/webrtc_internals.cc
|
| @@ -69,10 +69,12 @@ const base::Value* WebRTCInternals::PendingUpdate::value() const {
|
| return value_.get();
|
| }
|
|
|
| -WebRTCInternals::WebRTCInternals() : WebRTCInternals(500) {}
|
| +WebRTCInternals::WebRTCInternals() : WebRTCInternals(500, true) {}
|
|
|
| -WebRTCInternals::WebRTCInternals(int aggregate_updates_ms)
|
| - : audio_debug_recordings_(false),
|
| +WebRTCInternals::WebRTCInternals(int aggregate_updates_ms,
|
| + bool should_block_power_saving)
|
| + : should_block_power_saving_(should_block_power_saving),
|
| + audio_debug_recordings_(false),
|
| event_log_recordings_(false),
|
| selecting_event_log_(false),
|
| aggregate_updates_ms_(aggregate_updates_ms),
|
| @@ -497,6 +499,9 @@ void WebRTCInternals::EnableEventLogRecordingsOnAllRenderProcessHosts() {
|
|
|
| void WebRTCInternals::CreateOrReleasePowerSaveBlocker() {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| + if (!should_block_power_saving_) {
|
| + return;
|
| + }
|
|
|
| if (peer_connection_data_.empty() && power_save_blocker_) {
|
| DVLOG(1) << ("Releasing the block on application suspension since no "
|
|
|