| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ |
| 6 #define CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ | 6 #define CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 class EtwSystemEventConsumer | 24 class EtwSystemEventConsumer |
| 25 : public base::win::EtwTraceConsumerBase<EtwSystemEventConsumer>, | 25 : public base::win::EtwTraceConsumerBase<EtwSystemEventConsumer>, |
| 26 public base::trace_event::TracingAgent { | 26 public base::trace_event::TracingAgent { |
| 27 public: | 27 public: |
| 28 // base::trace_event::TracingAgent implementation. | 28 // base::trace_event::TracingAgent implementation. |
| 29 std::string GetTracingAgentName() override; | 29 std::string GetTracingAgentName() override; |
| 30 std::string GetTraceEventLabel() override; | 30 std::string GetTraceEventLabel() override; |
| 31 bool StartAgentTracing( | 31 void StartAgentTracing(const base::trace_event::TraceConfig& trace_config, |
| 32 const base::trace_event::TraceConfig& trace_config) override; | 32 const StartAgentTracingCallback& callback) override; |
| 33 void StopAgentTracing(const StopAgentTracingCallback& callback) override; | 33 void StopAgentTracing(const StopAgentTracingCallback& callback) override; |
| 34 | 34 |
| 35 // Retrieve the ETW consumer instance. | 35 // Retrieve the ETW consumer instance. |
| 36 static EtwSystemEventConsumer* GetInstance(); | 36 static EtwSystemEventConsumer* GetInstance(); |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 // This allows constructor and destructor to be private and usable only | 39 // This allows constructor and destructor to be private and usable only |
| 40 // by the Singleton class. | 40 // by the Singleton class. |
| 41 friend struct base::DefaultSingletonTraits<EtwSystemEventConsumer>; | 41 friend struct base::DefaultSingletonTraits<EtwSystemEventConsumer>; |
| 42 | 42 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 72 base::Thread thread_; | 72 base::Thread thread_; |
| 73 TRACEHANDLE session_handle_; | 73 TRACEHANDLE session_handle_; |
| 74 base::win::EtwTraceProperties properties_; | 74 base::win::EtwTraceProperties properties_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(EtwSystemEventConsumer); | 76 DISALLOW_COPY_AND_ASSIGN(EtwSystemEventConsumer); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| 80 | 80 |
| 81 #endif // CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ | 81 #endif // CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ |
| OLD | NEW |