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

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

Issue 1139123006: Fork the mojo shell interfaces used by Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 7 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
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/tracing_app.h" 5 #include "mojo/services/tracing/tracing_app.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/application/public/cpp/application_connection.h"
9 #include "mojo/services/tracing/trace_data_sink.h" 10 #include "mojo/services/tracing/trace_data_sink.h"
10 #include "third_party/mojo/src/mojo/public/cpp/application/application_connectio n.h"
11 11
12 namespace tracing { 12 namespace tracing {
13 13
14 class CollectorImpl : public TraceDataCollector { 14 class CollectorImpl : public TraceDataCollector {
15 public: 15 public:
16 CollectorImpl(mojo::InterfaceRequest<TraceDataCollector> request, 16 CollectorImpl(mojo::InterfaceRequest<TraceDataCollector> request,
17 TraceDataSink* sink) 17 TraceDataSink* sink)
18 : sink_(sink), binding_(this, request.Pass()) {} 18 : sink_(sink), binding_(this, request.Pass()) {}
19 19
20 ~CollectorImpl() override {} 20 ~CollectorImpl() override {}
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 base::Bind(&TracingApp::AllDataCollected, base::Unretained(this)), 80 base::Bind(&TracingApp::AllDataCollected, base::Unretained(this)),
81 base::TimeDelta::FromSeconds(1)); 81 base::TimeDelta::FromSeconds(1));
82 } 82 }
83 83
84 void TracingApp::AllDataCollected() { 84 void TracingApp::AllDataCollected() {
85 collector_impls_.clear(); 85 collector_impls_.clear();
86 sink_->Flush(); 86 sink_->Flush();
87 } 87 }
88 88
89 } // namespace tracing 89 } // namespace tracing
OLDNEW
« no previous file with comments | « mojo/services/tracing/tracing_app.h ('k') | mojo/shell/BUILD.gn » ('j') | mojo/tools/rev_sdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698