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

Side by Side Diff: services/tracing/public/cpp/provider.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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/service_manager/tests/util.cc ('k') | services/tracing/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 "services/tracing/public/cpp/provider.h" 5 #include "services/tracing/public/cpp/provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 27 matching lines...) Expand all
38 38
39 Provider::Provider() 39 Provider::Provider()
40 : binding_(this), tracing_forced_(false), weak_factory_(this) {} 40 : binding_(this), tracing_forced_(false), weak_factory_(this) {}
41 41
42 Provider::~Provider() { 42 Provider::~Provider() {
43 StopTracing(); 43 StopTracing();
44 } 44 }
45 45
46 void Provider::InitializeWithFactoryInternal(mojom::FactoryPtr* factory) { 46 void Provider::InitializeWithFactoryInternal(mojom::FactoryPtr* factory) {
47 mojom::ProviderPtr provider; 47 mojom::ProviderPtr provider;
48 Bind(GetProxy(&provider)); 48 Bind(MakeRequest(&provider));
49 (*factory)->CreateRecorder(std::move(provider)); 49 (*factory)->CreateRecorder(std::move(provider));
50 #ifdef NDEBUG 50 #ifdef NDEBUG
51 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 51 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
52 tracing::kEarlyTracing)) { 52 tracing::kEarlyTracing)) {
53 ForceEnableTracing(); 53 ForceEnableTracing();
54 } 54 }
55 #else 55 #else
56 ForceEnableTracing(); 56 ForceEnableTracing();
57 #endif 57 #endif
58 } 58 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // events. Empty string is not a valid chunk to record so skip in this case. 151 // events. Empty string is not a valid chunk to record so skip in this case.
152 if (!events_str->data().empty()) { 152 if (!events_str->data().empty()) {
153 recorder_->Record(mojo::String(events_str->data())); 153 recorder_->Record(mojo::String(events_str->data()));
154 } 154 }
155 if (!has_more_events) { 155 if (!has_more_events) {
156 recorder_.reset(); 156 recorder_.reset();
157 } 157 }
158 } 158 }
159 159
160 } // namespace tracing 160 } // namespace tracing
OLDNEW
« no previous file with comments | « services/service_manager/tests/util.cc ('k') | services/tracing/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698