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

Unified Diff: mojo/common/trace_controller_impl.h

Issue 1105773002: Teach the mojo_shell --trace-startup flag to gather data from services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: buffer data from tracing service to avoid needing to frame it or add extra commas Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/common/trace_controller_impl.cc » ('j') | mojo/common/trace_controller_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/trace_controller_impl.h
diff --git a/mojo/common/trace_controller_impl.h b/mojo/common/trace_controller_impl.h
index 5d8cf28398b8572e94aee51767b9f04a08d476d4..f53396aef9653df0fcd1b9c3a93ec6866679356e 100644
--- a/mojo/common/trace_controller_impl.h
+++ b/mojo/common/trace_controller_impl.h
@@ -16,9 +16,16 @@ class TraceControllerImpl : public tracing::TraceController {
public:
explicit TraceControllerImpl(
InterfaceRequest<tracing::TraceController> request);
-
~TraceControllerImpl() override;
+ // Set to true if base::trace_event::TraceLog is enabled externally to this
+ // class. If this is set to true this class will save the collector but not
+ // enable tracing when it receives a StartTracing message from the tracing
+ // service.
+ void set_tracing_already_started(bool tracing_already_started) {
+ tracing_already_started_ = tracing_already_started;
+ }
+
private:
// tracing::TraceController implementation:
void StartTracing(const String& categories,
@@ -28,6 +35,7 @@ class TraceControllerImpl : public tracing::TraceController {
void SendChunk(const scoped_refptr<base::RefCountedString>& events_str,
bool has_more_events);
+ bool tracing_already_started_;
tracing::TraceDataCollectorPtr collector_;
StrongBinding<tracing::TraceController> binding_;
« no previous file with comments | « no previous file | mojo/common/trace_controller_impl.cc » ('j') | mojo/common/trace_controller_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698