| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "services/tracing/recorder.h" | |
| 6 | |
| 7 namespace tracing { | |
| 8 | |
| 9 Recorder::Recorder(mojom::RecorderRequest request, DataSink* sink) | |
| 10 : sink_(sink), binding_(this, std::move(request)) {} | |
| 11 Recorder::~Recorder() {} | |
| 12 | |
| 13 void Recorder::TryRead() { | |
| 14 binding_.WaitForIncomingMethodCall(MojoDeadline(0)); | |
| 15 } | |
| 16 | |
| 17 mojo::Handle Recorder::RecorderHandle() const { | |
| 18 return binding_.handle(); | |
| 19 } | |
| 20 | |
| 21 void Recorder::Record(const std::string& json) { | |
| 22 sink_->AddChunk(json); | |
| 23 } | |
| 24 | |
| 25 } // namespace tracing | |
| OLD | NEW |