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

Unified Diff: components/feedback/feedback_data.cc

Issue 1004933003: favor DCHECK_CURRENTLY_ON for better logs in components/ (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
Index: components/feedback/feedback_data.cc
diff --git a/components/feedback/feedback_data.cc b/components/feedback/feedback_data.cc
index 6b2fc4932246b284fa1f00b863c1ff5f9baf137e..5c424d90e0ddcd92ba6b203adba0757bec6647d1 100644
--- a/components/feedback/feedback_data.cc
+++ b/components/feedback/feedback_data.cc
@@ -44,7 +44,7 @@ void FeedbackData::OnFeedbackPageDataComplete() {
void FeedbackData::SetAndCompressSystemInfo(
scoped_ptr<FeedbackData::SystemLogsMap> sys_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (trace_id_ != 0) {
TracingManager* manager = TracingManager::Get();
@@ -70,7 +70,7 @@ void FeedbackData::SetAndCompressSystemInfo(
void FeedbackData::SetAndCompressHistograms(
scoped_ptr<std::string> histograms) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!histograms.get())
return;
@@ -87,7 +87,7 @@ void FeedbackData::SetAndCompressHistograms(
void FeedbackData::AttachAndCompressFileData(
scoped_ptr<std::string> attached_filedata) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!attached_filedata.get() || attached_filedata->empty())
return;
@@ -107,7 +107,7 @@ void FeedbackData::AttachAndCompressFileData(
void FeedbackData::OnGetTraceData(
int trace_id,
scoped_refptr<base::RefCountedString> trace_data) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
TracingManager* manager = TracingManager::Get();
if (manager)
manager->DiscardTraceData(trace_id);
@@ -124,7 +124,7 @@ void FeedbackData::OnGetTraceData(
}
void FeedbackData::OnCompressComplete() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
--pending_op_count_;
SendReport();
}
@@ -134,7 +134,7 @@ bool FeedbackData::IsDataComplete() {
}
void FeedbackData::SendReport() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (IsDataComplete() && !report_sent_) {
report_sent_ = true;
send_report_.Run(this);
« no previous file with comments | « components/crash/browser/crash_handler_host_linux.cc ('k') | components/metrics/profiler/tracking_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698