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

Side by Side Diff: services/tracing/trace_recorder_impl.cc

Issue 1284293003: Rename tracing interfaces. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « services/tracing/trace_recorder_impl.h ('k') | services/tracing/tracing_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/tracing/collector_impl.h" 5 #include "services/tracing/trace_recorder_impl.h"
6 6
7 namespace tracing { 7 namespace tracing {
8 8
9 CollectorImpl::CollectorImpl(mojo::InterfaceRequest<TraceDataCollector> request, 9 TraceRecorderImpl::TraceRecorderImpl(
10 TraceDataSink* sink) 10 mojo::InterfaceRequest<TraceRecorder> request,
11 TraceDataSink* sink)
11 : sink_(sink), binding_(this, request.Pass()) { 12 : sink_(sink), binding_(this, request.Pass()) {
12 } 13 }
13 14
14 CollectorImpl::~CollectorImpl() { 15 TraceRecorderImpl::~TraceRecorderImpl() {
15 } 16 }
16 17
17 void CollectorImpl::TryRead() { 18 void TraceRecorderImpl::TryRead() {
18 binding_.WaitForIncomingMethodCall(MojoDeadline(0)); 19 binding_.WaitForIncomingMethodCall(MojoDeadline(0));
19 } 20 }
20 21
21 mojo::Handle CollectorImpl::TraceDataCollectorHandle() const { 22 mojo::Handle TraceRecorderImpl::TraceRecorderHandle() const {
22 return binding_.handle(); 23 return binding_.handle();
23 } 24 }
24 25
25 void CollectorImpl::DataCollected(const mojo::String& json) { 26 void TraceRecorderImpl::Record(const mojo::String& json) {
26 sink_->AddChunk(json.To<std::string>()); 27 sink_->AddChunk(json.To<std::string>());
27 } 28 }
28 29
29 } // namespace tracing 30 } // namespace tracing
OLDNEW
« no previous file with comments | « services/tracing/trace_recorder_impl.h ('k') | services/tracing/tracing_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698