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

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

Issue 1821913002: Revert of Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « mojo/services/tracing/tracing_app.h ('k') | mojo/shell/background/tests/test_service.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/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
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() { 45 void TracingApp::ShellConnectionLost() {
46 // TODO(beng): This is only required because TracingApp isn't run by
47 // ApplicationRunner - instead it's launched automatically by the standalone
48 // shell. It shouldn't be.
49 base::MessageLoop::current()->QuitWhenIdle(); 46 base::MessageLoop::current()->QuitWhenIdle();
50 return false;
51 } 47 }
52 48
53 void TracingApp::Create(mojo::Connection* connection, 49 void TracingApp::Create(mojo::Connection* connection,
54 mojo::InterfaceRequest<TraceCollector> request) { 50 mojo::InterfaceRequest<TraceCollector> request) {
55 collector_binding_.Bind(std::move(request)); 51 collector_binding_.Bind(std::move(request));
56 } 52 }
57 53
58 void TracingApp::Create( 54 void TracingApp::Create(
59 mojo::Connection* connection, 55 mojo::Connection* connection,
60 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) { 56 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const GetStartupPerformanceTimesCallback& callback) { 173 const GetStartupPerformanceTimesCallback& callback) {
178 callback.Run(startup_performance_times_.Clone()); 174 callback.Run(startup_performance_times_.Clone());
179 } 175 }
180 176
181 void TracingApp::AllDataCollected() { 177 void TracingApp::AllDataCollected() {
182 recorder_impls_.clear(); 178 recorder_impls_.clear();
183 sink_.reset(); 179 sink_.reset();
184 } 180 }
185 181
186 } // namespace tracing 182 } // namespace tracing
OLDNEW
« no previous file with comments | « mojo/services/tracing/tracing_app.h ('k') | mojo/shell/background/tests/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698