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

Side by Side Diff: base/logging_win.cc

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.h ('k') | base/win/event_trace_consumer.h » ('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/logging_win.h" 5 #include "base/logging_win.h"
6 #include "base/singleton.h" 6 #include "base/singleton.h"
7 #include <initguid.h> // NOLINT 7 #include <initguid.h> // NOLINT
8 8
9 namespace { 9 namespace {
10 10
11 typedef StaticMemorySingletonTraits<logging::LogEventProvider> 11 typedef StaticMemorySingletonTraits<logging::LogEventProvider>
12 LogEventSingletonTraits; 12 LogEventSingletonTraits;
13 Singleton<logging::LogEventProvider, LogEventSingletonTraits> log_provider; 13 Singleton<logging::LogEventProvider, LogEventSingletonTraits> log_provider;
14 14
15 } // namespace 15 } // namespace
16 16
17 namespace logging { 17 namespace logging {
18 18
19 using base::win::EtwEventLevel;
20 using base::win::EtwMofEvent;
21
19 DEFINE_GUID(kLogEventId, 22 DEFINE_GUID(kLogEventId,
20 0x7fe69228, 0x633e, 0x4f06, 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7); 23 0x7fe69228, 0x633e, 0x4f06, 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7);
21 24
22 LogEventProvider::LogEventProvider() : old_log_level_(LOG_NONE) { 25 LogEventProvider::LogEventProvider() : old_log_level_(LOG_NONE) {
23 } 26 }
24 27
25 bool LogEventProvider::LogMessage(logging::LogSeverity severity, 28 bool LogEventProvider::LogMessage(logging::LogSeverity severity,
26 const char* file, int line, size_t message_start, 29 const char* file, int line, size_t message_start,
27 const std::string& message) { 30 const std::string& message) {
28 EtwEventLevel level = TRACE_LEVEL_NONE; 31 EtwEventLevel level = TRACE_LEVEL_NONE;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 SetMinLogLevel(TRACE_LEVEL_INFORMATION - level); 133 SetMinLogLevel(TRACE_LEVEL_INFORMATION - level);
131 } 134 }
132 } 135 }
133 136
134 void LogEventProvider::OnEventsDisabled() { 137 void LogEventProvider::OnEventsDisabled() {
135 // Restore the old log level. 138 // Restore the old log level.
136 SetMinLogLevel(old_log_level_); 139 SetMinLogLevel(old_log_level_);
137 } 140 }
138 141
139 } // namespace logging 142 } // namespace logging
OLDNEW
« no previous file with comments | « base/logging_win.h ('k') | base/win/event_trace_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698