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

Side by Side Diff: base/win/event_trace_consumer.h

Issue 4517004: Move Windows-specific Event Tracing for Windows implementation to base/win. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixed another ETW user in Chrome Frame Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/logging_win.cc ('k') | base/win/event_trace_consumer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 consumer base class. 5 // Declaration of a Windows event trace consumer base class.
6 #ifndef BASE_EVENT_TRACE_CONSUMER_WIN_H_ 6 #ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_
7 #define BASE_EVENT_TRACE_CONSUMER_WIN_H_ 7 #define BASE_WIN_EVENT_TRACE_CONSUMER_H_
8 #pragma once 8 #pragma once
9 9
10 #include <windows.h> 10 #include <windows.h>
11 #include <wmistr.h> 11 #include <wmistr.h>
12 #include <evntrace.h> 12 #include <evntrace.h>
13 #include <vector> 13 #include <vector>
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 15
16 namespace base {
17 namespace win {
18
16 // This class is a base class that makes it easier to consume events 19 // This class is a base class that makes it easier to consume events
17 // from realtime or file sessions. Concrete consumers need to sublass 20 // from realtime or file sessions. Concrete consumers need to sublass
18 // a specialization of this class and override the ProcessEvent and/or 21 // a specialization of this class and override the ProcessEvent and/or
19 // the ProcessBuffer methods to implement the event consumption logic. 22 // the ProcessBuffer methods to implement the event consumption logic.
20 // Usage might look like: 23 // Usage might look like:
21 // class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> { 24 // class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> {
22 // protected: 25 // protected:
23 // static VOID WINAPI ProcessEvent(PEVENT_TRACE event); 26 // static VOID WINAPI ProcessEvent(PEVENT_TRACE event);
24 // }; 27 // };
25 // 28 //
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if (FAILED(HRESULT_FROM_WIN32(ret))) 137 if (FAILED(HRESULT_FROM_WIN32(ret)))
135 hr = HRESULT_FROM_WIN32(ret); 138 hr = HRESULT_FROM_WIN32(ret);
136 } 139 }
137 140
138 trace_handles_.clear(); 141 trace_handles_.clear();
139 } 142 }
140 143
141 return hr; 144 return hr;
142 } 145 }
143 146
144 #endif // BASE_EVENT_TRACE_CONSUMER_WIN_H_ 147 } // namespace win
148 } // namespace base
149
150 #endif // BASE_WIN_EVENT_TRACE_CONSUMER_H_
OLDNEW
« no previous file with comments | « base/logging_win.cc ('k') | base/win/event_trace_consumer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698