| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <time.h> | 6 #include <time.h> |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/common/chrome_version_info_values.h" | |
| 11 #include "chrome/tools/crash_service/caps/logger_win.h" | 10 #include "chrome/tools/crash_service/caps/logger_win.h" |
| 11 #include "components/version_info/version_info_values.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 // Every message has this structure: | 14 // Every message has this structure: |
| 15 // <index>~ <tick_count> <message> ~\n" | 15 // <index>~ <tick_count> <message> ~\n" |
| 16 const char kMessageHeader[] = "%03d~ %08x %s ~\n"; | 16 const char kMessageHeader[] = "%03d~ %08x %s ~\n"; |
| 17 | 17 |
| 18 // Do not re-order these messages. Only add at the end. | 18 // Do not re-order these messages. Only add at the end. |
| 19 const char* kMessages[] { | 19 const char* kMessages[] { |
| 20 "start pid(%lu) version(%s) time(%s)", // 0 | 20 "start pid(%lu) version(%s) time(%s)", // 0 |
| 21 "exit pid(%lu) time(%s)", // 1 | 21 "exit pid(%lu) time(%s)", // 1 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 Logger::~Logger() { | 80 Logger::~Logger() { |
| 81 if (file_ != INVALID_HANDLE_VALUE) { | 81 if (file_ != INVALID_HANDLE_VALUE) { |
| 82 WriteFormattedLogLine( | 82 WriteFormattedLogLine( |
| 83 file_, 1, ::GetCurrentProcessId(), DateTime().c_str()); | 83 file_, 1, ::GetCurrentProcessId(), DateTime().c_str()); |
| 84 ::CloseHandle(file_); | 84 ::CloseHandle(file_); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace caps | 88 } // namespace caps |
| 89 | 89 |
| OLD | NEW |