summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormostynb <mostynb@opera.com>2015-03-25 17:51:19 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-26 00:52:09 +0000
commit366eaf1d53e51685c382749f5bda16ce0bfa37ad (patch)
tree836424cfbbacd14994dc5ab14254216fa15f99ed
parent150f086c1cc91090378a61556d58b70fd53dc32d (diff)
downloadchromium_src-366eaf1d53e51685c382749f5bda16ce0bfa37ad.zip
chromium_src-366eaf1d53e51685c382749f5bda16ce0bfa37ad.tar.gz
chromium_src-366eaf1d53e51685c382749f5bda16ce0bfa37ad.tar.bz2
favor DCHECK_CURRENTLY_ON for better logs in content/browser
BUG=466848 Review URL: https://codereview.chromium.org/1031133003 Cr-Commit-Position: refs/heads/master@{#322280}
-rw-r--r--content/browser/frame_host/frame_tree_node.cc2
-rw-r--r--content/browser/gpu/gpu_process_host.cc2
-rw-r--r--content/browser/media/capture/aura_window_capture_machine.cc14
-rw-r--r--content/browser/media/cdm/browser_cdm_manager.cc2
4 files changed, 10 insertions, 10 deletions
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 7df1291..1a4a5cf 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -32,7 +32,7 @@ int64 FrameTreeNode::next_frame_tree_node_id_ = 1;
// static
FrameTreeNode* FrameTreeNode::GloballyFindByID(int64 frame_tree_node_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
FrameTreeNodeIDMap* nodes = g_frame_tree_node_id_map.Pointer();
FrameTreeNodeIDMap::iterator it = nodes->find(frame_tree_node_id);
return it == nodes->end() ? nullptr : it->second;
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 98a6f2a..18b51fe 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -504,7 +504,7 @@ bool GpuProcessHost::Init() {
return false;
if (in_process_) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(g_gpu_main_thread_factory);
in_process_gpu_thread_.reset(
g_gpu_main_thread_factory(InProcessChildThreadParams(
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc
index f3a1ec8..0ef3d18 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));
diff --git a/content/browser/media/cdm/browser_cdm_manager.cc b/content/browser/media/cdm/browser_cdm_manager.cc
index 2f33760..74370e5 100644
--- a/content/browser/media/cdm/browser_cdm_manager.cc
+++ b/content/browser/media/cdm/browser_cdm_manager.cc
@@ -514,7 +514,7 @@ void BrowserCdmManager::CheckPermissionStatusOnUIThread(
int render_frame_id,
const GURL& security_origin,
const base::Callback<void(bool)>& permission_status_cb) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RenderFrameHost* rfh =
RenderFrameHost::FromID(render_process_id_, render_frame_id);