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 "chromecast/crash/linux/minidump_writer.h" | 5 #include "chromecast/crash/linux/minidump_writer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chromecast/base/path_utils.h" | 10 #include "chromecast/base/path_utils.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Run the dumpstate callback. | 82 // Run the dumpstate callback. |
83 DCHECK(!dump_state_cb_.is_null()); | 83 DCHECK(!dump_state_cb_.is_null()); |
84 if (dump_state_cb_.Run(minidump_path_.value()) < 0) { | 84 if (dump_state_cb_.Run(minidump_path_.value()) < 0) { |
85 LOG(ERROR) << "DumpState callback failed."; | 85 LOG(ERROR) << "DumpState callback failed."; |
86 return -1; | 86 return -1; |
87 } | 87 } |
88 | 88 |
89 // Add this entry to the lockfile. | 89 // Add this entry to the lockfile. |
90 const DumpInfo info(minidump_path_.value(), | 90 const DumpInfo info(minidump_path_.value(), |
91 minidump_path_.value() + kDumpStateSuffix, | 91 minidump_path_.value() + kDumpStateSuffix, |
92 time(nullptr), | 92 base::Time::Now(), params_); |
93 params_); | |
94 if (AddEntryToLockFile(info) < 0) { | 93 if (AddEntryToLockFile(info) < 0) { |
95 LOG(ERROR) << "lockfile logging failed"; | 94 LOG(ERROR) << "lockfile logging failed"; |
96 return -1; | 95 return -1; |
97 } | 96 } |
98 | 97 |
99 return 0; | 98 return 0; |
100 } | 99 } |
101 | 100 |
102 } // namespace crash_manager | 101 } // namespace crash_manager |
OLD | NEW |