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

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

Issue 1031133003: favor DCHECK_CURRENTLY_ON for better logs in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/aura_window_capture_machine.cc
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc
index f3a1ec81faa35a989dee7d9a4d8fcaec43ac7a5b..0ef3d18b2f9a4a838ec3821822bc989243f7e84b 100644
--- a/content/browser/media/capture/aura_window_capture_machine.cc
+++ b/content/browser/media/capture/aura_window_capture_machine.cc
@@ -120,7 +120,7 @@ AuraWindowCaptureMachine::~AuraWindowCaptureMachine() {}
bool AuraWindowCaptureMachine::Start(
const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy,
const media::VideoCaptureParams& params) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// The window might be destroyed between SetWindow() and Start().
if (!desktop_window_)
@@ -157,7 +157,7 @@ bool AuraWindowCaptureMachine::Start(
}
void AuraWindowCaptureMachine::Stop(const base::Closure& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
power_save_blocker_.reset();
// Stop observing compositor and window events.
@@ -177,7 +177,7 @@ void AuraWindowCaptureMachine::Stop(const base::Closure& callback) {
}
void AuraWindowCaptureMachine::SetWindow(aura::Window* window) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!desktop_window_);
desktop_window_ = window;
@@ -193,7 +193,7 @@ void AuraWindowCaptureMachine::SetWindow(aura::Window* window) {
}
void AuraWindowCaptureMachine::UpdateCaptureSize() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (oracle_proxy_.get() && desktop_window_) {
ui::Layer* layer = desktop_window_->layer();
oracle_proxy_->UpdateCaptureSize(ui::ConvertSizeToPixel(
@@ -203,7 +203,7 @@ void AuraWindowCaptureMachine::UpdateCaptureSize() {
}
void AuraWindowCaptureMachine::Capture(bool dirty) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Do not capture if the desktop window is already destroyed.
if (!desktop_window_)
@@ -267,7 +267,7 @@ bool AuraWindowCaptureMachine::ProcessCopyOutputResponse(
base::TimeTicks start_time,
const ThreadSafeCaptureOracle::CaptureFrameCallback& capture_frame_cb,
scoped_ptr<cc::CopyOutputResult> result) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (result->IsEmpty() || result->size().IsEmpty() || !desktop_window_)
return false;
@@ -421,7 +421,7 @@ void AuraWindowCaptureMachine::OnWindowBoundsChanged(
}
void AuraWindowCaptureMachine::OnWindowDestroyed(aura::Window* window) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Stop(base::Bind(&base::DoNothing));
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698