OLD | NEW |
---|---|
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 #ifndef SERVICES_TRACING_TRACING_APP_H_ | 5 #ifndef SERVICES_TRACING_TRACING_APP_H_ |
6 #define SERVICES_TRACING_TRACING_APP_H_ | 6 #define SERVICES_TRACING_TRACING_APP_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "mojo/common/binding_set.h" | |
11 #include "mojo/common/interface_ptr_set.h" | 12 #include "mojo/common/interface_ptr_set.h" |
12 #include "mojo/public/cpp/application/application_delegate.h" | 13 #include "mojo/public/cpp/application/application_delegate.h" |
13 #include "mojo/public/cpp/application/application_impl.h" | 14 #include "mojo/public/cpp/application/application_impl.h" |
14 #include "mojo/public/cpp/bindings/strong_binding.h" | 15 #include "mojo/public/cpp/bindings/strong_binding.h" |
15 #include "mojo/services/tracing/interfaces/tracing.mojom.h" | 16 #include "mojo/services/tracing/interfaces/tracing.mojom.h" |
16 #include "services/tracing/trace_data_sink.h" | 17 #include "services/tracing/trace_data_sink.h" |
17 #include "services/tracing/trace_recorder_impl.h" | 18 #include "services/tracing/trace_recorder_impl.h" |
18 | 19 |
19 namespace tracing { | 20 namespace tracing { |
20 | 21 |
(...skipping 16 matching lines...) Expand all Loading... | |
37 // tracing::TraceCollector implementation. | 38 // tracing::TraceCollector implementation. |
38 void Start(mojo::ScopedDataPipeProducerHandle stream, | 39 void Start(mojo::ScopedDataPipeProducerHandle stream, |
39 const mojo::String& categories) override; | 40 const mojo::String& categories) override; |
40 void StopAndFlush() override; | 41 void StopAndFlush() override; |
41 | 42 |
42 void AllDataCollected(); | 43 void AllDataCollected(); |
43 | 44 |
44 scoped_ptr<TraceDataSink> sink_; | 45 scoped_ptr<TraceDataSink> sink_; |
45 ScopedVector<TraceRecorderImpl> recorder_impls_; | 46 ScopedVector<TraceRecorderImpl> recorder_impls_; |
46 mojo::InterfacePtrSet<TraceProvider> provider_ptrs_; | 47 mojo::InterfacePtrSet<TraceProvider> provider_ptrs_; |
47 mojo::Binding<TraceCollector> collector_binding_; | 48 mojo::BindingSet<TraceCollector> collector_bindings_; |
ppi
2015/12/20 15:36:21
Collector instances are "stateful", it is incorrec
jeffbrown
2015/12/20 20:52:58
Ahhh, then this whole class is somewhat problemati
ppi
2015/12/21 09:39:50
Yes, and the problems go deeper, down to C++ base:
| |
48 bool tracing_active_; | 49 bool tracing_active_; |
49 mojo::String tracing_categories_; | 50 mojo::String tracing_categories_; |
50 | 51 |
51 DISALLOW_COPY_AND_ASSIGN(TracingApp); | 52 DISALLOW_COPY_AND_ASSIGN(TracingApp); |
52 }; | 53 }; |
53 | 54 |
54 } // namespace tracing | 55 } // namespace tracing |
55 | 56 |
56 #endif // SERVICES_TRACING_TRACING_APP_H_ | 57 #endif // SERVICES_TRACING_TRACING_APP_H_ |
OLD | NEW |