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

Unified Diff: chrome/test/base/tracing.cc

Issue 1052373008: [chrome/test] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « chrome/test/base/testing_io_thread_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/tracing.cc
diff --git a/chrome/test/base/tracing.cc b/chrome/test/base/tracing.cc
index f9d9f57a9b6ef4e1d861d7095eaf5f9a143faeaf..2120b9f7d852c3e252e13a9384939d0df7bd79c6 100644
--- a/chrome/test/base/tracing.cc
+++ b/chrome/test/base/tracing.cc
@@ -55,7 +55,7 @@ class InProcessTraceController {
virtual ~InProcessTraceController() {}
bool BeginTracing(const std::string& category_patterns) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return content::TracingController::GetInstance()->EnableRecording(
base::trace_event::CategoryFilter(category_patterns),
base::trace_event::TraceOptions(),
@@ -66,7 +66,7 @@ class InProcessTraceController {
const std::string& category_name,
const std::string& event_name,
int num_occurrences) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(num_occurrences > 0);
watch_notification_count_ = num_occurrences;
if (!content::TracingController::GetInstance()->SetWatchEvent(
@@ -89,7 +89,7 @@ class InProcessTraceController {
}
bool WaitForWatchEvent(base::TimeDelta timeout) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (watch_notification_count_ == 0)
return true;
@@ -107,7 +107,7 @@ class InProcessTraceController {
}
bool EndTracing(std::string* json_trace_output) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
using namespace base::debug;
if (!content::TracingController::GetInstance()->DisableRecording(
« no previous file with comments | « chrome/test/base/testing_io_thread_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698