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

Side by Side Diff: base/event_trace_provider_win.cc

Issue 3800006: Fix event tracing for windows test flakyness.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 months 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/event_trace_provider_win.h ('k') | base/trace_event_win_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 #include "base/event_trace_provider_win.h" 5 #include "base/event_trace_provider_win.h"
6 #include <windows.h> 6 #include <windows.h>
7 #include <cguid.h> 7 #include <cguid.h>
8 8
9 TRACE_GUID_REGISTRATION EtwTraceProvider::obligatory_guid_registration_ = { 9 TRACE_GUID_REGISTRATION EtwTraceProvider::obligatory_guid_registration_ = {
10 &GUID_NULL, 10 &GUID_NULL,
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 ULONG EtwTraceProvider::DisableEvents() { 43 ULONG EtwTraceProvider::DisableEvents() {
44 // Give subclasses a chance to digest the state change. 44 // Give subclasses a chance to digest the state change.
45 OnEventsDisabled(); 45 OnEventsDisabled();
46 46
47 enable_level_ = 0; 47 enable_level_ = 0;
48 enable_flags_ = 0; 48 enable_flags_ = 0;
49 session_handle_ = NULL; 49 session_handle_ = NULL;
50 50
51 PostEventsDisabled();
52
51 return ERROR_SUCCESS; 53 return ERROR_SUCCESS;
52 } 54 }
53 55
54 ULONG EtwTraceProvider::Callback(WMIDPREQUESTCODE request, void* buffer) { 56 ULONG EtwTraceProvider::Callback(WMIDPREQUESTCODE request, void* buffer) {
55 switch (request) { 57 switch (request) {
56 case WMI_ENABLE_EVENTS: 58 case WMI_ENABLE_EVENTS:
57 return EnableEvents(buffer); 59 return EnableEvents(buffer);
58 case WMI_DISABLE_EVENTS: 60 case WMI_DISABLE_EVENTS:
59 return DisableEvents(); 61 return DisableEvents();
60 default: 62 default:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 119
118 return ::TraceEvent(session_handle_, &event.header); 120 return ::TraceEvent(session_handle_, &event.header);
119 } 121 }
120 122
121 ULONG EtwTraceProvider::Log(EVENT_TRACE_HEADER* event) { 123 ULONG EtwTraceProvider::Log(EVENT_TRACE_HEADER* event) {
122 if (enable_level_ < event->Class.Level) 124 if (enable_level_ < event->Class.Level)
123 return ERROR_SUCCESS; 125 return ERROR_SUCCESS;
124 126
125 return ::TraceEvent(session_handle_, event); 127 return ::TraceEvent(session_handle_, event);
126 } 128 }
OLDNEW
« no previous file with comments | « base/event_trace_provider_win.h ('k') | base/trace_event_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698