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

Unified Diff: mojo/common/trace_provider_impl.h

Issue 1334213002: Support for tracing app initialization. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Change BindingSet to Binding Created 5 years, 3 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
Index: mojo/common/trace_provider_impl.h
diff --git a/mojo/common/trace_provider_impl.h b/mojo/common/trace_provider_impl.h
index 82735a57c8cef7d9e7da11a5145b87a0d5973083..02f20b770ec806fcf2dc07ee01c5fd286ab3e6a3 100644
--- a/mojo/common/trace_provider_impl.h
+++ b/mojo/common/trace_provider_impl.h
@@ -7,23 +7,17 @@
#include "base/memory/ref_counted_memory.h"
#include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
namespace mojo {
class TraceProviderImpl : public tracing::TraceProvider {
public:
- explicit TraceProviderImpl(InterfaceRequest<tracing::TraceProvider> request);
+ TraceProviderImpl();
~TraceProviderImpl() 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;
- }
+ // Enable tracing without waiting for an inbound connection.
+ void EnableTracingNow();
private:
// tracing::TraceProvider implementation:
@@ -33,10 +27,11 @@ class TraceProviderImpl : public tracing::TraceProvider {
void SendChunk(const scoped_refptr<base::RefCountedString>& events_str,
bool has_more_events);
+ void DelayedStop();
+ void StopIfForced();
- bool tracing_already_started_;
+ bool tracing_forced_;
tracing::TraceRecorderPtr recorder_;
- StrongBinding<tracing::TraceProvider> binding_;
DISALLOW_COPY_AND_ASSIGN(TraceProviderImpl);
};

Powered by Google App Engine
This is Rietveld 408576698