OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Declaration of a Windows event trace provider class, to allow using | 5 // Declaration of a Windows event trace provider class, to allow using |
6 // Windows Event Tracing for logging transport and control. | 6 // Windows Event Tracing for logging transport and control. |
7 #ifndef BASE_EVENT_TRACE_PROVIDER_WIN_H_ | 7 #ifndef BASE_WIN_EVENT_TRACE_PROVIDER_H_ |
8 #define BASE_EVENT_TRACE_PROVIDER_WIN_H_ | 8 #define BASE_WIN_EVENT_TRACE_PROVIDER_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <windows.h> | 11 #include <windows.h> |
12 #include <wmistr.h> | 12 #include <wmistr.h> |
13 #include <evntrace.h> | 13 #include <evntrace.h> |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 | 15 |
| 16 namespace base { |
| 17 namespace win { |
| 18 |
16 typedef GUID EtwEventClass; | 19 typedef GUID EtwEventClass; |
17 typedef UCHAR EtwEventType; | 20 typedef UCHAR EtwEventType; |
18 typedef UCHAR EtwEventLevel; | 21 typedef UCHAR EtwEventLevel; |
19 typedef USHORT EtwEventVersion; | 22 typedef USHORT EtwEventVersion; |
20 typedef ULONG EtwEventFlags; | 23 typedef ULONG EtwEventFlags; |
21 | 24 |
22 // Base class is a POD for correctness. | 25 // Base class is a POD for correctness. |
23 template <size_t N> struct EtwMofEventBase { | 26 template <size_t N> struct EtwMofEventBase { |
24 EVENT_TRACE_HEADER header; | 27 EVENT_TRACE_HEADER header; |
25 MOF_FIELD fields[N]; | 28 MOF_FIELD fields[N]; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 EtwEventFlags enable_flags_; | 161 EtwEventFlags enable_flags_; |
159 EtwEventLevel enable_level_; | 162 EtwEventLevel enable_level_; |
160 | 163 |
161 // We don't use this, but on XP we're obliged to pass one in to | 164 // We don't use this, but on XP we're obliged to pass one in to |
162 // RegisterTraceGuids. Non-const, because that's how the API needs it. | 165 // RegisterTraceGuids. Non-const, because that's how the API needs it. |
163 static TRACE_GUID_REGISTRATION obligatory_guid_registration_; | 166 static TRACE_GUID_REGISTRATION obligatory_guid_registration_; |
164 | 167 |
165 DISALLOW_COPY_AND_ASSIGN(EtwTraceProvider); | 168 DISALLOW_COPY_AND_ASSIGN(EtwTraceProvider); |
166 }; | 169 }; |
167 | 170 |
168 #endif // BASE_EVENT_TRACE_PROVIDER_WIN_H_ | 171 } // namespace win |
| 172 } // namespace base |
| 173 |
| 174 #endif // BASE_WIN_EVENT_TRACE_PROVIDER_H_ |
OLD | NEW |