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

Side by Side Diff: chrome/test/logging/win/log_file_reader.cc

Issue 877323002: Mechanical rename of tracing includes for /chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « chrome/test/logging/win/log_file_printer.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/logging/win/log_file_reader.h" 5 #include "chrome/test/logging/win/log_file_reader.h"
6 6
7 #include "base/debug/trace_event_win.h"
8 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
10 #include "base/logging_win.h" 9 #include "base/logging_win.h"
11 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
11 #include "base/trace_event/trace_event_win.h"
12 #include "base/win/event_trace_consumer.h" 12 #include "base/win/event_trace_consumer.h"
13 #include "chrome/test/logging/win/mof_data_parser.h" 13 #include "chrome/test/logging/win/mof_data_parser.h"
14 14
15 namespace logging_win { 15 namespace logging_win {
16 16
17 namespace { 17 namespace {
18 18
19 // TODO(grt) This reverses a mapping produced by base/logging_win.cc's 19 // TODO(grt) This reverses a mapping produced by base/logging_win.cc's
20 // LogEventProvider::LogMessage. LogEventProvider should expose a way to map an 20 // LogEventProvider::LogMessage. LogEventProvider should expose a way to map an
21 // event level back to a log severity. 21 // event level back to a log severity.
(...skipping 10 matching lines...) Expand all
32 return logging::LOG_WARNING; 32 return logging::LOG_WARNING;
33 case TRACE_LEVEL_INFORMATION: 33 case TRACE_LEVEL_INFORMATION:
34 return logging::LOG_INFO; 34 return logging::LOG_INFO;
35 default: 35 default:
36 // Trace levels above information correspond to negative severity levels, 36 // Trace levels above information correspond to negative severity levels,
37 // which are used for VLOG verbosity levels. 37 // which are used for VLOG verbosity levels.
38 return TRACE_LEVEL_INFORMATION - level; 38 return TRACE_LEVEL_INFORMATION - level;
39 } 39 }
40 } 40 }
41 41
42 // TODO(grt) This reverses a mapping produced by base/debug/trace_event_win.cc's 42 // TODO(grt): This reverses a mapping produced by
43 // TraceEventETWProvider::TraceEvent. TraceEventETWProvider should expose a way 43 // base/trace_event/trace_event_win.cc's TraceEventETWProvider::TraceEvent.
44 // to map an event type back to a trace type. 44 // TraceEventETWProvider should expose a way to map an event type back to a
45 // trace type.
45 char EventTypeToTraceType(uint8 event_type) { 46 char EventTypeToTraceType(uint8 event_type) {
46 switch (event_type) { 47 switch (event_type) {
47 case base::debug::kTraceEventTypeBegin: 48 case base::debug::kTraceEventTypeBegin:
48 return TRACE_EVENT_PHASE_BEGIN; 49 return TRACE_EVENT_PHASE_BEGIN;
49 break; 50 break;
50 case base::debug::kTraceEventTypeEnd: 51 case base::debug::kTraceEventTypeEnd:
51 return TRACE_EVENT_PHASE_END; 52 return TRACE_EVENT_PHASE_END;
52 break; 53 break;
53 case base::debug::kTraceEventTypeInstant: 54 case base::debug::kTraceEventTypeInstant:
54 return TRACE_EVENT_PHASE_INSTANT; 55 return TRACE_EVENT_PHASE_INSTANT;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 253 }
253 254
254 LogFileDelegate::~LogFileDelegate() { 255 LogFileDelegate::~LogFileDelegate() {
255 } 256 }
256 257
257 void ReadLogFile(const base::FilePath& log_file, LogFileDelegate* delegate) { 258 void ReadLogFile(const base::FilePath& log_file, LogFileDelegate* delegate) {
258 DCHECK(delegate); 259 DCHECK(delegate);
259 LogFileReader::ReadFile(log_file, delegate); 260 LogFileReader::ReadFile(log_file, delegate);
260 } 261 }
261 262
262 } // logging_win 263 } // namespace logging_win
OLDNEW
« no previous file with comments | « chrome/test/logging/win/log_file_printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698