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

Side by Side Diff: mojo/common/trace_provider_impl.cc

Issue 2010283006: Almost done: ApplicationDelegate -> ApplicationImplBase conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@work798-x-work797-x-work796_no_run_main_app
Patch Set: rebased Created 4 years, 6 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/application/content_handler_factory.cc ('k') | mojo/common/tracing_impl.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/common/trace_provider_impl.h" 5 #include "mojo/common/trace_provider_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "base/trace_event/trace_config.h" 13 #include "base/trace_event/trace_config.h"
14 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
15 #include "mojo/public/cpp/application/application_impl.h"
16 15
17 namespace mojo { 16 namespace mojo {
18 17
19 TraceProviderImpl::TraceProviderImpl() 18 TraceProviderImpl::TraceProviderImpl()
20 : binding_(this), tracing_forced_(false), weak_factory_(this) {} 19 : binding_(this), tracing_forced_(false), weak_factory_(this) {}
21 20
22 TraceProviderImpl::~TraceProviderImpl() {} 21 TraceProviderImpl::~TraceProviderImpl() {}
23 22
24 void TraceProviderImpl::Bind(InterfaceRequest<tracing::TraceProvider> request) { 23 void TraceProviderImpl::Bind(InterfaceRequest<tracing::TraceProvider> request) {
25 if (!binding_.is_bound()) { 24 if (!binding_.is_bound()) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // events. Empty string is not a valid chunk to record so skip in this case. 90 // events. Empty string is not a valid chunk to record so skip in this case.
92 if (!events_str->data().empty()) { 91 if (!events_str->data().empty()) {
93 recorder_->Record(mojo::String(events_str->data())); 92 recorder_->Record(mojo::String(events_str->data()));
94 } 93 }
95 if (!has_more_events) { 94 if (!has_more_events) {
96 recorder_.reset(); 95 recorder_.reset();
97 } 96 }
98 } 97 }
99 98
100 } // namespace mojo 99 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/application/content_handler_factory.cc ('k') | mojo/common/tracing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698