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 #include "chromecast/crash/linux/dump_info.h" | 4 #include "chromecast/crash/linux/dump_info.h" |
5 | 5 |
| 6 #include <errno.h> |
6 #include <stdlib.h> | 7 #include <stdlib.h> |
7 | 8 |
8 #include "base/logging.h" | 9 #include "base/logging.h" |
9 #include "base/values.h" | 10 #include "base/values.h" |
10 | 11 |
11 namespace chromecast { | 12 namespace chromecast { |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 const char kDumpTimeFormat[] = "%Y-%m-%d %H:%M:%S"; | 16 const char kDumpTimeFormat[] = "%Y-%m-%d %H:%M:%S"; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 char* text = strptime(timestr.c_str(), kDumpTimeFormat, &tm); | 165 char* text = strptime(timestr.c_str(), kDumpTimeFormat, &tm); |
165 dump_time_ = mktime(&tm); | 166 dump_time_ = mktime(&tm); |
166 if (!text || dump_time_ < 0) { | 167 if (!text || dump_time_ < 0) { |
167 LOG(INFO) << "Failed to convert dump time invalid"; | 168 LOG(INFO) << "Failed to convert dump time invalid"; |
168 return false; | 169 return false; |
169 } | 170 } |
170 return true; | 171 return true; |
171 } | 172 } |
172 | 173 |
173 } // namespace chromecast | 174 } // namespace chromecast |
OLD | NEW |