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

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

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « services/tracing/tracing_app.h ('k') | services/ui/gpu/gpu_service_impl.h » ('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 "services/tracing/tracing_app.h" 5 #include "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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 bool TracingApp::OnStop() { 45 bool TracingApp::OnStop() {
46 // TODO(beng): This is only required because TracingApp isn't run by 46 // TODO(beng): This is only required because TracingApp isn't run by
47 // ServiceRunner - instead it's launched automatically by the standalone 47 // ServiceRunner - instead it's launched automatically by the standalone
48 // shell. It shouldn't be. 48 // shell. It shouldn't be.
49 base::MessageLoop::current()->QuitWhenIdle(); 49 base::MessageLoop::current()->QuitWhenIdle();
50 return false; 50 return false;
51 } 51 }
52 52
53 void TracingApp::Create(shell::Connection* connection, 53 void TracingApp::Create(const shell::Identity& remote_identity,
54 mojo::InterfaceRequest<TraceCollector> request) { 54 mojo::InterfaceRequest<TraceCollector> request) {
55 collector_binding_.Bind(std::move(request)); 55 collector_binding_.Bind(std::move(request));
56 } 56 }
57 57
58 void TracingApp::Create( 58 void TracingApp::Create(
59 shell::Connection* connection, 59 const shell::Identity& remote_identity,
60 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) { 60 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) {
61 startup_performance_data_collector_bindings_.AddBinding(this, 61 startup_performance_data_collector_bindings_.AddBinding(this,
62 std::move(request)); 62 std::move(request));
63 } 63 }
64 64
65 void TracingApp::Start(mojo::ScopedDataPipeProducerHandle stream, 65 void TracingApp::Start(mojo::ScopedDataPipeProducerHandle stream,
66 const mojo::String& categories) { 66 const mojo::String& categories) {
67 tracing_categories_ = categories; 67 tracing_categories_ = categories;
68 sink_.reset(new TraceDataSink(std::move(stream))); 68 sink_.reset(new TraceDataSink(std::move(stream)));
69 provider_ptrs_.ForAllPtrs([categories, this](TraceProvider* controller) { 69 provider_ptrs_.ForAllPtrs([categories, this](TraceProvider* controller) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const GetStartupPerformanceTimesCallback& callback) { 177 const GetStartupPerformanceTimesCallback& callback) {
178 callback.Run(startup_performance_times_.Clone()); 178 callback.Run(startup_performance_times_.Clone());
179 } 179 }
180 180
181 void TracingApp::AllDataCollected() { 181 void TracingApp::AllDataCollected() {
182 recorder_impls_.clear(); 182 recorder_impls_.clear();
183 sink_.reset(); 183 sink_.reset();
184 } 184 }
185 185
186 } // namespace tracing 186 } // namespace tracing
OLDNEW
« no previous file with comments | « services/tracing/tracing_app.h ('k') | services/ui/gpu/gpu_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698