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

Unified Diff: mojo/common/tracing_impl.h

Issue 791493006: De-client tracing.TraceController interface (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/tracing_impl.h
diff --git a/mojo/common/tracing_impl.h b/mojo/common/tracing_impl.h
index ffc617b56d1131437fc6e2542e48a3664a722d72..53f6b845be737254ce1f4eed95281e1d0e731589 100644
--- a/mojo/common/tracing_impl.h
+++ b/mojo/common/tracing_impl.h
@@ -5,42 +5,27 @@
#ifndef MOJO_COMMON_TRACING_IMPL_H_
#define MOJO_COMMON_TRACING_IMPL_H_
-#include "base/basictypes.h"
-#include "base/files/file_path.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/ref_counted_memory.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "base/macros.h"
+#include "mojo/public/cpp/application/interface_factory.h"
#include "services/tracing/tracing.mojom.h"
namespace mojo {
class ApplicationImpl;
-class TracingImpl : public tracing::TraceController {
+class TracingImpl : public InterfaceFactory<tracing::TraceController> {
public:
- // This constructs a TracingImpl and connects to the tracing service. The
- // lifetime of the TracingImpl is bound to the connection to the tracing
- // service.
- static void Create(ApplicationImpl* app);
+ TracingImpl();
+ ~TracingImpl() override;
- // This constructs a TracingImpl around a tracing::TraceDataCollectorPtr
- // already bound to the service.
- static void Create(tracing::TraceDataCollectorPtr ptr);
-
- virtual ~TracingImpl();
+ // This connects to the tracing service and registers ourselves to provide
+ // tracing data on demand.
+ void Initialize(ApplicationImpl* app);
private:
- explicit TracingImpl(ApplicationImpl* app);
- explicit TracingImpl(tracing::TraceDataCollectorPtr ptr);
-
- // Overridden from tracing::TraceController:
- void StartTracing(const String& categories) override;
- void StopTracing() override;
-
- void SendChunk(const scoped_refptr<base::RefCountedString>& events_str,
- bool has_more_events);
-
- StrongBinding<tracing::TraceController> binding_;
+ // InterfaceFactory<tracing::TraceController> implementation.
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<tracing::TraceController> request) override;
DISALLOW_COPY_AND_ASSIGN(TracingImpl);
};

Powered by Google App Engine
This is Rietveld 408576698