| Index: shell/tracer.cc
|
| diff --git a/shell/tracer.cc b/shell/tracer.cc
|
| index ff0400d9f799cc087d612fe037c1c3df7b3613a3..62925f2ae26a31624fe6fb4a57e9adff1f3d35cf 100644
|
| --- a/shell/tracer.cc
|
| +++ b/shell/tracer.cc
|
| @@ -17,11 +17,12 @@
|
| namespace shell {
|
|
|
| Tracer::Tracer()
|
| - : tracing_(false), first_chunk_written_(false), trace_file_(nullptr) {
|
| -}
|
| + : trace_provider_binding_(&trace_provider_impl_),
|
| + tracing_(false),
|
| + first_chunk_written_(false),
|
| + trace_file_(nullptr) {}
|
|
|
| -Tracer::~Tracer() {
|
| -}
|
| +Tracer::~Tracer() {}
|
|
|
| void Tracer::Start(const std::string& categories,
|
| const std::string& duration_seconds_str,
|
| @@ -67,8 +68,11 @@ void Tracer::StopAndFlushToFile() {
|
|
|
| void Tracer::ConnectToProvider(
|
| mojo::InterfaceRequest<tracing::TraceProvider> request) {
|
| - auto impl = new mojo::TraceProviderImpl(request.Pass());
|
| - impl->set_tracing_already_started(tracing_);
|
| + if (!trace_provider_binding_.is_bound()) {
|
| + trace_provider_binding_.Bind(request.Pass());
|
| + } else {
|
| + LOG(ERROR) << "Cannot accept two connections to TraceProvider.";
|
| + }
|
| }
|
|
|
| void Tracer::StopTracingAndFlushToDisk() {
|
|
|