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 #include "mojo/services/tracing/tracing_app.h" | 5 #include "mojo/services/tracing/tracing_app.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 24 matching lines...) Expand all Loading... |
35 if (tracing_active_) { | 35 if (tracing_active_) { |
36 TraceRecorderPtr recorder_ptr; | 36 TraceRecorderPtr recorder_ptr; |
37 recorder_impls_.push_back( | 37 recorder_impls_.push_back( |
38 new TraceRecorderImpl(GetProxy(&recorder_ptr), sink_.get())); | 38 new TraceRecorderImpl(GetProxy(&recorder_ptr), sink_.get())); |
39 provider_ptr->StartTracing(tracing_categories_, std::move(recorder_ptr)); | 39 provider_ptr->StartTracing(tracing_categories_, std::move(recorder_ptr)); |
40 } | 40 } |
41 provider_ptrs_.AddInterfacePtr(std::move(provider_ptr)); | 41 provider_ptrs_.AddInterfacePtr(std::move(provider_ptr)); |
42 return true; | 42 return true; |
43 } | 43 } |
44 | 44 |
| 45 bool TracingApp::ShellConnectionLost() { |
| 46 base::MessageLoop::current()->QuitWhenIdle(); |
| 47 return true; |
| 48 } |
| 49 |
45 void TracingApp::Create(mojo::Connection* connection, | 50 void TracingApp::Create(mojo::Connection* connection, |
46 mojo::InterfaceRequest<TraceCollector> request) { | 51 mojo::InterfaceRequest<TraceCollector> request) { |
47 collector_binding_.Bind(std::move(request)); | 52 collector_binding_.Bind(std::move(request)); |
48 } | 53 } |
49 | 54 |
50 void TracingApp::Create( | 55 void TracingApp::Create( |
51 mojo::Connection* connection, | 56 mojo::Connection* connection, |
52 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) { | 57 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) { |
53 startup_performance_data_collector_bindings_.AddBinding(this, | 58 startup_performance_data_collector_bindings_.AddBinding(this, |
54 std::move(request)); | 59 std::move(request)); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 const GetStartupPerformanceTimesCallback& callback) { | 174 const GetStartupPerformanceTimesCallback& callback) { |
170 callback.Run(startup_performance_times_.Clone()); | 175 callback.Run(startup_performance_times_.Clone()); |
171 } | 176 } |
172 | 177 |
173 void TracingApp::AllDataCollected() { | 178 void TracingApp::AllDataCollected() { |
174 recorder_impls_.clear(); | 179 recorder_impls_.clear(); |
175 sink_.reset(); | 180 sink_.reset(); |
176 } | 181 } |
177 | 182 |
178 } // namespace tracing | 183 } // namespace tracing |
OLD | NEW |