Commit 9b5bc632 authored by John Williams's avatar John Williams Committed by Commit Bot

[Cast MRP] Stop mirroring when Chrome shuts down.

Bug: b/161367720
Change-Id: I619b88eec584b2124dcab6434e59f45cfe0e9c2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2300661
Commit-Queue: John Williams <jrw@chromium.org>
Reviewed-by: default avatarTakumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793279}
parent 86677ba6
...@@ -133,6 +133,14 @@ MirroringActivity::MirroringActivity( ...@@ -133,6 +133,14 @@ MirroringActivity::MirroringActivity(
} }
MirroringActivity::~MirroringActivity() { MirroringActivity::~MirroringActivity() {
// Usually mirroring will have already been stopped by this point, but when
// Chrome is shutting down, this is our first indication that mirroring needs
// to stop. Without this call, if a user shuts down Chrome while mirroring,
// the receiver will continue to show the last mirrored frame for several
// seconds, which could be bad if the user was shutting down Chrome
// specifically to prevent someone from seeing what they were mirroring!
StopMirroring();
if (did_start_mirroring_timestamp_) { if (did_start_mirroring_timestamp_) {
base::UmaHistogramLongTimes( base::UmaHistogramLongTimes(
kHistogramSessionLength, kHistogramSessionLength,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment