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

Unified Diff: mojo/common/trace_controller_impl.cc

Issue 1055703002: Gather trace data by waiting on handles with a fixed timeout (Closed) Base URL: git@github.com:domokit/mojo.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: mojo/common/trace_controller_impl.cc
diff --git a/mojo/common/trace_controller_impl.cc b/mojo/common/trace_controller_impl.cc
index a5b0ea13a6ff0005dbeebef8841e1707e859700b..e7e5cd9d3fe2d9f961a017b71d76a100fce3cdab 100644
--- a/mojo/common/trace_controller_impl.cc
+++ b/mojo/common/trace_controller_impl.cc
@@ -4,6 +4,7 @@
#include "mojo/common/trace_controller_impl.h"
+#include "base/logging.h"
#include "base/trace_event/trace_event.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_impl.h"
@@ -31,6 +32,7 @@ void TraceControllerImpl::StartTracing(
}
void TraceControllerImpl::StopTracing() {
+ DCHECK(collector_);
base::trace_event::TraceLog::GetInstance()->SetDisabled();
base::trace_event::TraceLog::GetInstance()->Flush(
@@ -40,6 +42,7 @@ void TraceControllerImpl::StopTracing() {
void TraceControllerImpl::SendChunk(
const scoped_refptr<base::RefCountedString>& events_str,
bool has_more_events) {
+ DCHECK(collector_);
collector_->DataCollected(mojo::String(events_str->data()));
if (!has_more_events) {
collector_.reset();

Powered by Google App Engine
This is Rietveld 408576698