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

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 1005683003: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[q-z]* (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/tracing/trace_message_filter.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index afff0734c453a068f8654ce346778f824d0e3eaf..480481fdb74b1151f55269cdc6324f1766721e49 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -188,7 +188,7 @@ TracingControllerImpl* TracingControllerImpl::GetInstance() {
bool TracingControllerImpl::GetCategories(
const GetCategoriesDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Known categories come back from child processes with the EndTracingAck
// message. So to get known categories, just begin and end tracing immediately
@@ -210,7 +210,7 @@ void TracingControllerImpl::SetEnabledOnFileThread(
int mode,
const TraceOptions& trace_options,
const base::Closure& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
TraceLog::GetInstance()->SetEnabled(
category_filter, static_cast<TraceLog::Mode>(mode), trace_options);
@@ -219,7 +219,7 @@ void TracingControllerImpl::SetEnabledOnFileThread(
void TracingControllerImpl::SetDisabledOnFileThread(
const base::Closure& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
TraceLog::GetInstance()->SetDisabled();
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
@@ -229,7 +229,7 @@ bool TracingControllerImpl::EnableRecording(
const CategoryFilter& category_filter,
const TraceOptions& trace_options,
const EnableRecordingDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_enable_recording())
return false;
@@ -274,7 +274,7 @@ void TracingControllerImpl::OnEnableRecordingDone(
const CategoryFilter& category_filter,
const TraceOptions& trace_options,
const EnableRecordingDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Notify all child processes.
for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
@@ -288,7 +288,7 @@ void TracingControllerImpl::OnEnableRecordingDone(
bool TracingControllerImpl::DisableRecording(
const scoped_refptr<TraceDataSink>& trace_data_sink) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_disable_recording())
return false;
@@ -307,7 +307,7 @@ bool TracingControllerImpl::DisableRecording(
}
void TracingControllerImpl::OnDisableRecordingDone() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
#if defined(OS_ANDROID)
if (pending_get_categories_done_callback_.is_null())
@@ -363,7 +363,7 @@ bool TracingControllerImpl::EnableMonitoring(
const CategoryFilter& category_filter,
const TraceOptions& trace_options,
const EnableMonitoringDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_enable_monitoring())
return false;
@@ -393,7 +393,7 @@ void TracingControllerImpl::OnEnableMonitoringDone(
const CategoryFilter& category_filter,
const TraceOptions& trace_options,
const EnableMonitoringDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Notify all child processes.
for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
@@ -407,7 +407,7 @@ void TracingControllerImpl::OnEnableMonitoringDone(
bool TracingControllerImpl::DisableMonitoring(
const DisableMonitoringDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_disable_monitoring())
return false;
@@ -437,7 +437,7 @@ TracingController::CreateFileSink(const base::FilePath& file_path,
void TracingControllerImpl::OnDisableMonitoringDone(
const DisableMonitoringDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
OnMonitoringStateChanged(false);
@@ -461,7 +461,7 @@ void TracingControllerImpl::GetMonitoringStatus(
bool TracingControllerImpl::CaptureMonitoringSnapshot(
const scoped_refptr<TraceDataSink>& monitoring_data_sink) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_disable_monitoring())
return false;
@@ -502,7 +502,7 @@ bool TracingControllerImpl::CaptureMonitoringSnapshot(
bool TracingControllerImpl::GetTraceBufferUsage(
const GetTraceBufferUsageCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_get_trace_buffer_usage() || callback.is_null())
return false;
@@ -538,7 +538,7 @@ bool TracingControllerImpl::SetWatchEvent(
const std::string& category_name,
const std::string& event_name,
const WatchEventCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (callback.is_null())
return false;
@@ -560,7 +560,7 @@ bool TracingControllerImpl::SetWatchEvent(
}
bool TracingControllerImpl::CancelWatchEvent() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!can_cancel_watch_event())
return false;
@@ -706,7 +706,7 @@ void TracingControllerImpl::OnDisableRecordingAcked(
#if defined(OS_CHROMEOS) || defined(OS_WIN)
void TracingControllerImpl::OnEndSystemTracingAcked(
const scoped_refptr<base::RefCountedString>& events_str_ptr) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (trace_data_sink_.get()) {
#if defined(OS_WIN)
« no previous file with comments | « content/browser/tracing/trace_message_filter.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698