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 #include "base/event_trace_provider_win.h" | 5 #include "base/win/event_trace_provider.h" |
6 #include <windows.h> | 6 #include <windows.h> |
7 #include <cguid.h> | 7 #include <cguid.h> |
8 | 8 |
| 9 namespace base { |
| 10 namespace win { |
| 11 |
9 TRACE_GUID_REGISTRATION EtwTraceProvider::obligatory_guid_registration_ = { | 12 TRACE_GUID_REGISTRATION EtwTraceProvider::obligatory_guid_registration_ = { |
10 &GUID_NULL, | 13 &GUID_NULL, |
11 NULL | 14 NULL |
12 }; | 15 }; |
13 | 16 |
14 EtwTraceProvider::EtwTraceProvider(const GUID& provider_name) | 17 EtwTraceProvider::EtwTraceProvider(const GUID& provider_name) |
15 : provider_name_(provider_name), registration_handle_(NULL), | 18 : provider_name_(provider_name), registration_handle_(NULL), |
16 session_handle_(NULL), enable_flags_(0), enable_level_(0) { | 19 session_handle_(NULL), enable_flags_(0), enable_level_(0) { |
17 } | 20 } |
18 | 21 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 122 |
120 return ::TraceEvent(session_handle_, &event.header); | 123 return ::TraceEvent(session_handle_, &event.header); |
121 } | 124 } |
122 | 125 |
123 ULONG EtwTraceProvider::Log(EVENT_TRACE_HEADER* event) { | 126 ULONG EtwTraceProvider::Log(EVENT_TRACE_HEADER* event) { |
124 if (enable_level_ < event->Class.Level) | 127 if (enable_level_ < event->Class.Level) |
125 return ERROR_SUCCESS; | 128 return ERROR_SUCCESS; |
126 | 129 |
127 return ::TraceEvent(session_handle_, event); | 130 return ::TraceEvent(session_handle_, event); |
128 } | 131 } |
| 132 |
| 133 } // namespace win |
| 134 } // namespace base |
OLD | NEW |