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 <memory> |
| 9 |
8 #include "base/bind.h" | 10 #include "base/bind.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
13 #include "base/trace_event/tracing_agent.h" | 14 #include "base/trace_event/tracing_agent.h" |
14 #include "base/values.h" | 15 #include "base/values.h" |
15 #include "base/win/event_trace_consumer.h" | 16 #include "base/win/event_trace_consumer.h" |
16 #include "base/win/event_trace_controller.h" | 17 #include "base/win/event_trace_controller.h" |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 template <typename Type> | 20 template <typename Type> |
20 struct DefaultSingletonTraits; | 21 struct DefaultSingletonTraits; |
21 } | 22 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // @returns true on success, false if an error occurred. | 63 // @returns true on success, false if an error occurred. |
63 bool StopKernelSessionTracing(); | 64 bool StopKernelSessionTracing(); |
64 | 65 |
65 void OnStopSystemTracingDone( | 66 void OnStopSystemTracingDone( |
66 const StopAgentTracingCallback& callback, | 67 const StopAgentTracingCallback& callback, |
67 const scoped_refptr<base::RefCountedString>& result); | 68 const scoped_refptr<base::RefCountedString>& result); |
68 | 69 |
69 void TraceAndConsumeOnThread(); | 70 void TraceAndConsumeOnThread(); |
70 void FlushOnThread(const StopAgentTracingCallback& callback); | 71 void FlushOnThread(const StopAgentTracingCallback& callback); |
71 | 72 |
72 scoped_ptr<base::ListValue> events_; | 73 std::unique_ptr<base::ListValue> events_; |
73 base::Thread thread_; | 74 base::Thread thread_; |
74 TRACEHANDLE session_handle_; | 75 TRACEHANDLE session_handle_; |
75 base::win::EtwTraceProperties properties_; | 76 base::win::EtwTraceProperties properties_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(EtwSystemEventConsumer); | 78 DISALLOW_COPY_AND_ASSIGN(EtwSystemEventConsumer); |
78 }; | 79 }; |
79 | 80 |
80 } // namespace content | 81 } // namespace content |
81 | 82 |
82 #endif // CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ | 83 #endif // CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_ |
OLD | NEW |