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

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

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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
« no previous file with comments | « base/win/event_trace_controller_unittest.cc ('k') | base/win/event_trace_provider_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_WIN_EVENT_TRACE_PROVIDER_H_ 7 #ifndef BASE_WIN_EVENT_TRACE_PROVIDER_H_
8 #define BASE_WIN_EVENT_TRACE_PROVIDER_H_ 8 #define BASE_WIN_EVENT_TRACE_PROVIDER_H_
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 EtwEventVersion version, EtwEventLevel level) { 60 EtwEventVersion version, EtwEventLevel level) {
61 memset(static_cast<Super*>(this), 0, sizeof(Super)); 61 memset(static_cast<Super*>(this), 0, sizeof(Super));
62 header.Size = sizeof(Super); 62 header.Size = sizeof(Super);
63 header.Guid = event_class; 63 header.Guid = event_class;
64 header.Class.Type = type; 64 header.Class.Type = type;
65 header.Class.Version = version; 65 header.Class.Version = version;
66 header.Class.Level = level; 66 header.Class.Level = level;
67 header.Flags = WNODE_FLAG_TRACED_GUID | WNODE_FLAG_USE_MOF_PTR; 67 header.Flags = WNODE_FLAG_TRACED_GUID | WNODE_FLAG_USE_MOF_PTR;
68 } 68 }
69 69
70 void SetField(int field, size_t size, const void *data) { 70 void SetField(size_t field, size_t size, const void* data) {
71 // DCHECK(field < N); 71 // DCHECK(field < N);
72 if ((field < N) && (size <= std::numeric_limits<uint32_t>::max())) { 72 if ((field < N) && (size <= std::numeric_limits<uint32_t>::max())) {
73 fields[field].DataPtr = reinterpret_cast<ULONG64>(data); 73 fields[field].DataPtr = reinterpret_cast<ULONG64>(data);
74 fields[field].Length = static_cast<ULONG>(size); 74 fields[field].Length = static_cast<ULONG>(size);
75 } 75 }
76 } 76 }
77 77
78 EVENT_TRACE_HEADER* get() { return& header; } 78 EVENT_TRACE_HEADER* get() { return& header; }
79 79
80 private: 80 private:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // RegisterTraceGuids. Non-const, because that's how the API needs it. 174 // RegisterTraceGuids. Non-const, because that's how the API needs it.
175 static TRACE_GUID_REGISTRATION obligatory_guid_registration_; 175 static TRACE_GUID_REGISTRATION obligatory_guid_registration_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(EtwTraceProvider); 177 DISALLOW_COPY_AND_ASSIGN(EtwTraceProvider);
178 }; 178 };
179 179
180 } // namespace win 180 } // namespace win
181 } // namespace base 181 } // namespace base
182 182
183 #endif // BASE_WIN_EVENT_TRACE_PROVIDER_H_ 183 #endif // BASE_WIN_EVENT_TRACE_PROVIDER_H_
OLDNEW
« no previous file with comments | « base/win/event_trace_controller_unittest.cc ('k') | base/win/event_trace_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698