| Index: services/tracing/trace_data_sink.cc
|
| diff --git a/services/tracing/trace_data_sink.cc b/services/tracing/trace_data_sink.cc
|
| index 1abf43ce0f1b69a8424e6c20dd2f3c14f00dbcc2..d1fe93622a8b3a3d48c0b3b3854274d6cde33730 100644
|
| --- a/services/tracing/trace_data_sink.cc
|
| +++ b/services/tracing/trace_data_sink.cc
|
| @@ -10,21 +10,14 @@
|
| using mojo::common::BlockingCopyFromString;
|
|
|
| namespace tracing {
|
| -namespace {
|
| -
|
| -const char kStart[] = "{\"traceEvents\":[";
|
| -const char kEnd[] = "]}";
|
| -
|
| -} // namespace
|
|
|
| TraceDataSink::TraceDataSink(mojo::ScopedDataPipeProducerHandle pipe)
|
| : pipe_(pipe.Pass()), empty_(true) {
|
| - BlockingCopyFromString(kStart, pipe_);
|
| }
|
|
|
| TraceDataSink::~TraceDataSink() {
|
| if (pipe_.is_valid())
|
| - Flush();
|
| + pipe_.reset();
|
| DCHECK(!pipe_.is_valid());
|
| }
|
|
|
| @@ -35,9 +28,4 @@ void TraceDataSink::AddChunk(const std::string& json) {
|
| BlockingCopyFromString(json, pipe_);
|
| }
|
|
|
| -void TraceDataSink::Flush() {
|
| - BlockingCopyFromString(kEnd, pipe_);
|
| - pipe_.reset();
|
| -}
|
| -
|
| } // namespace tracing
|
|
|