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

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

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (Closed)
Patch Set: . Created 3 years, 8 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/service_manager/tests/util.cc ('k') | services/ui/demo/mus_demo_unittests.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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "base/threading/platform_thread.h" 15 #include "base/threading/platform_thread.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/trace_event/trace_config.h" 18 #include "base/trace_event/trace_config.h"
19 #include "base/trace_event/trace_event.h" 19 #include "base/trace_event/trace_event.h"
20 #include "services/service_manager/public/cpp/connection.h"
21 #include "services/service_manager/public/cpp/connector.h" 20 #include "services/service_manager/public/cpp/connector.h"
22 #include "services/tracing/public/cpp/switches.h" 21 #include "services/tracing/public/cpp/switches.h"
23 #include "services/tracing/public/interfaces/constants.mojom.h" 22 #include "services/tracing/public/interfaces/constants.mojom.h"
24 23
25 namespace tracing { 24 namespace tracing {
26 namespace { 25 namespace {
27 26
28 // Controls access to |g_tracing_singleton_created|, which can be accessed from 27 // Controls access to |g_tracing_singleton_created|, which can be accessed from
29 // different threads. 28 // different threads.
30 base::LazyInstance<base::Lock>::Leaky g_singleton_lock = 29 base::LazyInstance<base::Lock>::Leaky g_singleton_lock =
(...skipping 120 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. 150 // events. Empty string is not a valid chunk to record so skip in this case.
152 if (!events_str->data().empty()) { 151 if (!events_str->data().empty()) {
153 recorder_->Record(events_str->data()); 152 recorder_->Record(events_str->data());
154 } 153 }
155 if (!has_more_events) { 154 if (!has_more_events) {
156 recorder_.reset(); 155 recorder_.reset();
157 } 156 }
158 } 157 }
159 158
160 } // namespace tracing 159 } // namespace tracing
OLDNEW
« no previous file with comments | « services/service_manager/tests/util.cc ('k') | services/ui/demo/mus_demo_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698