| OLD | NEW |
| 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_printer.h" | 5 #include "chrome/test/logging/win/log_file_printer.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <objbase.h> | 8 #include <objbase.h> |
| 9 | 9 |
| 10 #include <iomanip> | 10 #include <iomanip> |
| 11 #include <ios> | 11 #include <ios> |
| 12 #include <ostream> | 12 #include <ostream> |
| 13 #include <sstream> | 13 #include <sstream> |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "base/debug/trace_event.h" | |
| 18 #include "base/logging.h" | 17 #include "base/logging.h" |
| 19 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_piece.h" | 19 #include "base/strings/string_piece.h" |
| 21 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "base/trace_event/trace_event.h" |
| 22 #include "chrome/test/logging/win/log_file_reader.h" | 22 #include "chrome/test/logging/win/log_file_reader.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 // TODO(grt) This duplicates private behavior in base/logging.cc's | 26 // TODO(grt) This duplicates private behavior in base/logging.cc's |
| 27 // LogMessage::Init. That behavior should be exposed and used here (possibly | 27 // LogMessage::Init. That behavior should be exposed and used here (possibly |
| 28 // by moving this function to logging.cc, making it use log_severity_names, and | 28 // by moving this function to logging.cc, making it use log_severity_names, and |
| 29 // publishing it in logging.h with BASE_EXPORT). | 29 // publishing it in logging.h with BASE_EXPORT). |
| 30 void WriteSeverityToStream(logging::LogSeverity severity, std::ostream* out) { | 30 void WriteSeverityToStream(logging::LogSeverity severity, std::ostream* out) { |
| 31 switch (severity) { | 31 switch (severity) { |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 << std::endl; | 237 << std::endl; |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace | 240 } // namespace |
| 241 | 241 |
| 242 void logging_win::PrintLogFile(const base::FilePath& log_file, | 242 void logging_win::PrintLogFile(const base::FilePath& log_file, |
| 243 std::ostream* out) { | 243 std::ostream* out) { |
| 244 EventPrinter printer(out); | 244 EventPrinter printer(out); |
| 245 logging_win::ReadLogFile(log_file, &printer); | 245 logging_win::ReadLogFile(log_file, &printer); |
| 246 } | 246 } |
| OLD | NEW |