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

Unified Diff: content/browser/media/capture/desktop_capture_device.cc

Issue 2625083006: [DesktopCaptureDevice] Remove the if no client_ check (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/desktop_capture_device.cc
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
index 18a0934000258a1fe3b0743fe737ffb5846e8378..2c5407f87796338d625c91893142d76cad6119fd 100644
--- a/content/browser/media/capture/desktop_capture_device.cc
+++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -217,6 +217,9 @@ void DesktopCaptureDevice::Core::OnCaptureResult(
}
}
+ if (!client_)
Sergey Ulanov 2017/01/13 07:49:03 Why do we need this check? As far as I can tell cl
Hzj_jie 2017/01/13 22:10:23 No, as I mentioned in the code review, this change
+ return;
+
if (!success) {
if (result == webrtc::DesktopCapturer::Result::ERROR_PERMANENT)
client_->OnError(FROM_HERE, "The desktop capturer has failed.");
@@ -224,9 +227,6 @@ void DesktopCaptureDevice::Core::OnCaptureResult(
}
DCHECK(frame);
- if (!client_)
- return;
-
base::TimeDelta capture_time(
base::TimeDelta::FromMilliseconds(frame->capture_time_ms()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698