Chromium Code Reviews| Index: mojo/common/tracing_impl.cc |
| diff --git a/mojo/common/tracing_impl.cc b/mojo/common/tracing_impl.cc |
| index 2a6eac1e92fc02c8a4110c1fa31d066cab981296..489c1bd741b1e9b7129341dfa2692b3edda3100b 100644 |
| --- a/mojo/common/tracing_impl.cc |
| +++ b/mojo/common/tracing_impl.cc |
| @@ -4,27 +4,36 @@ |
| #include "mojo/common/tracing_impl.h" |
| +#include "base/callback.h" |
| +#include "base/time/time.h" |
| +#include "base/trace_event/trace_config.h" |
| +#include "base/trace_event/trace_event.h" |
|
qsr
2015/09/11 15:12:20
Most of those includes seem not useful.
etiennej
2015/09/11 15:16:45
Done.
|
| #include "base/trace_event/trace_event_impl.h" |
| -#include "mojo/common/trace_provider_impl.h" |
| #include "mojo/public/cpp/application/application_connection.h" |
| #include "mojo/public/cpp/application/application_impl.h" |
| namespace mojo { |
| -TracingImpl::TracingImpl() { |
| -} |
| +TracingImpl::TracingImpl() {} |
| -TracingImpl::~TracingImpl() { |
| -} |
| +TracingImpl::~TracingImpl() {} |
| void TracingImpl::Initialize(ApplicationImpl* app) { |
| ApplicationConnection* connection = app->ConnectToApplication("mojo:tracing"); |
| connection->AddService(this); |
| + |
| +#ifdef NDEBUG |
| + if (app->HasArg("--early-tracing")) { |
| + provider_impl_.EnableTracingNow(); |
| + } |
| +#else |
| + provider_impl_.EnableTracingNow(); |
| +#endif |
| } |
| void TracingImpl::Create(ApplicationConnection* connection, |
| InterfaceRequest<tracing::TraceProvider> request) { |
| - new TraceProviderImpl(request.Pass()); |
| + provider_impl_.Bind(request.Pass()); |
| } |
| } // namespace mojo |