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

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

Issue 1539863002: Convert Pass()→std::move() in mojo/services/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing forward declare that was masked by pre-existing incorrect #include ordering. Created 5 years 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 | « mojo/services/tracing/trace_data_sink.cc ('k') | mojo/services/tracing/tracing_app.cc » ('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 "mojo/services/tracing/trace_recorder_impl.h" 5 #include "mojo/services/tracing/trace_recorder_impl.h"
6 6
7 #include <utility>
8
7 namespace tracing { 9 namespace tracing {
8 10
9 TraceRecorderImpl::TraceRecorderImpl( 11 TraceRecorderImpl::TraceRecorderImpl(
10 mojo::InterfaceRequest<TraceRecorder> request, 12 mojo::InterfaceRequest<TraceRecorder> request,
11 TraceDataSink* sink) 13 TraceDataSink* sink)
12 : sink_(sink), binding_(this, request.Pass()) { 14 : sink_(sink), binding_(this, std::move(request)) {}
13 }
14 15
15 TraceRecorderImpl::~TraceRecorderImpl() { 16 TraceRecorderImpl::~TraceRecorderImpl() {
16 } 17 }
17 18
18 void TraceRecorderImpl::TryRead() { 19 void TraceRecorderImpl::TryRead() {
19 binding_.WaitForIncomingMethodCall(MojoDeadline(0)); 20 binding_.WaitForIncomingMethodCall(MojoDeadline(0));
20 } 21 }
21 22
22 mojo::Handle TraceRecorderImpl::TraceRecorderHandle() const { 23 mojo::Handle TraceRecorderImpl::TraceRecorderHandle() const {
23 return binding_.handle(); 24 return binding_.handle();
24 } 25 }
25 26
26 void TraceRecorderImpl::Record(const mojo::String& json) { 27 void TraceRecorderImpl::Record(const mojo::String& json) {
27 sink_->AddChunk(json.To<std::string>()); 28 sink_->AddChunk(json.To<std::string>());
28 } 29 }
29 30
30 } // namespace tracing 31 } // namespace tracing
OLDNEW
« no previous file with comments | « mojo/services/tracing/trace_data_sink.cc ('k') | mojo/services/tracing/tracing_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698