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

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

Issue 1908373003: Rename EtwSystemEventConsumerWin to EtwTracingAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « base/trace_event/tracing_agent.h ('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
deleted file mode 100644
index 35d7d4c1c3d2fecb0b29ec688a6115f8e69f85f4..0000000000000000000000000000000000000000
--- a/content/browser/tracing/etw_system_event_consumer_win.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_
-#define CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_
-
-#include <memory>
-
-#include "base/bind.h"
-#include "base/macros.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"
-
-namespace base {
-template <typename Type>
-struct DefaultSingletonTraits;
-}
-
-namespace content {
-
-class EtwSystemEventConsumer
- : public base::win::EtwTraceConsumerBase<EtwSystemEventConsumer>,
- public base::trace_event::TracingAgent {
- public:
- // base::trace_event::TracingAgent implementation.
- std::string GetTracingAgentName() override;
- std::string GetTraceEventLabel() override;
- void StartAgentTracing(const base::trace_event::TraceConfig& trace_config,
- const StartAgentTracingCallback& callback) override;
- void StopAgentTracing(const StopAgentTracingCallback& callback) override;
-
- // Retrieve the ETW consumer instance.
- static EtwSystemEventConsumer* GetInstance();
-
- private:
- // This allows constructor and destructor to be private and usable only
- // by the Singleton class.
- friend struct base::DefaultSingletonTraits<EtwSystemEventConsumer>;
-
- // Constructor.
- EtwSystemEventConsumer();
- ~EtwSystemEventConsumer() override;
-
- void AddSyncEventToBuffer();
- void AppendEventToBuffer(EVENT_TRACE* event);
-
- // Static override of EtwTraceConsumerBase::ProcessEvent.
- // @param event the raw ETW event to process.
- friend class base::win::EtwTraceConsumerBase<EtwSystemEventConsumer>;
- static void ProcessEvent(EVENT_TRACE* event);
-
- // Request the ETW trace controller to activate the kernel tracing.
- // returns true on success, false if the kernel tracing isn't activated.
- bool StartKernelSessionTracing();
-
- // Request the ETW trace controller to deactivate the kernel tracing.
- // @param callback the callback to call with the consumed events.
- // @returns true on success, false if an error occurred.
- bool StopKernelSessionTracing();
-
- void OnStopSystemTracingDone(
- const StopAgentTracingCallback& callback,
- const scoped_refptr<base::RefCountedString>& result);
-
- void TraceAndConsumeOnThread();
- void FlushOnThread(const StopAgentTracingCallback& callback);
-
- std::unique_ptr<base::ListValue> events_;
- base::Thread thread_;
- TRACEHANDLE session_handle_;
- base::win::EtwTraceProperties properties_;
-
- DISALLOW_COPY_AND_ASSIGN(EtwSystemEventConsumer);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_
« no previous file with comments | « base/trace_event/tracing_agent.h ('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