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

Unified Diff: content/browser/tracing/etw_system_event_consumer_win.h

Issue 1468173003: [Tracing Clock Sync] Add TracingAgent interface in Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix Created 5 years 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 | « chromeos/dbus/fake_debug_daemon_client.cc ('k') | content/browser/tracing/etw_system_event_consumer_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/etw_system_event_consumer_win.h
diff --git a/content/browser/tracing/etw_system_event_consumer_win.h b/content/browser/tracing/etw_system_event_consumer_win.h
index 25f4656f7ada72bceb2c50d39e626f8e53729e02..8ab7c8a80682edd7779866d315810f681110806c 100644
--- a/content/browser/tracing/etw_system_event_consumer_win.h
+++ b/content/browser/tracing/etw_system_event_consumer_win.h
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/memory/ref_counted_memory.h"
#include "base/threading/thread.h"
+#include "base/trace_event/tracing_agent.h"
#include "base/values.h"
#include "base/win/event_trace_consumer.h"
#include "base/win/event_trace_controller.h"
@@ -19,14 +20,16 @@ struct DefaultSingletonTraits;
namespace content {
-class EtwSystemEventConsumer :
- public base::win::EtwTraceConsumerBase<EtwSystemEventConsumer> {
+class EtwSystemEventConsumer
+ : public base::win::EtwTraceConsumerBase<EtwSystemEventConsumer>,
+ public base::trace_event::TracingAgent {
public:
- typedef base::Callback<void(const scoped_refptr<base::RefCountedString>&)>
- OutputCallback;
-
- bool StartSystemTracing();
- void StopSystemTracing(const OutputCallback& callback);
+ // base::trace_event::TracingAgent implementation.
+ std::string GetTracingAgentName() override;
+ std::string GetTraceEventLabel() override;
+ bool StartAgentTracing(
+ const base::trace_event::TraceConfig& trace_config) override;
+ void StopAgentTracing(const StopAgentTracingCallback& callback) override;
// Retrieve the ETW consumer instance.
static EtwSystemEventConsumer* GetInstance();
@@ -38,7 +41,7 @@ class EtwSystemEventConsumer :
// Constructor.
EtwSystemEventConsumer();
- virtual ~EtwSystemEventConsumer();
+ ~EtwSystemEventConsumer() override;
void AddSyncEventToBuffer();
void AppendEventToBuffer(EVENT_TRACE* event);
@@ -58,11 +61,11 @@ class EtwSystemEventConsumer :
bool StopKernelSessionTracing();
void OnStopSystemTracingDone(
- const OutputCallback& callback,
+ const StopAgentTracingCallback& callback,
const scoped_refptr<base::RefCountedString>& result);
void TraceAndConsumeOnThread();
- void FlushOnThread(const OutputCallback& callback);
+ void FlushOnThread(const StopAgentTracingCallback& callback);
scoped_ptr<base::ListValue> events_;
base::Thread thread_;
« no previous file with comments | « chromeos/dbus/fake_debug_daemon_client.cc ('k') | content/browser/tracing/etw_system_event_consumer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698