| 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 <errno.h> |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool DumpInfo::SetDumpTimeFromString(const std::string& timestr) { | 143 bool DumpInfo::SetDumpTimeFromString(const std::string& timestr) { |
| 144 base::Time::Exploded ex = {0}; | 144 base::Time::Exploded ex = {0}; |
| 145 if (sscanf(timestr.c_str(), kDumpTimeFormat, &ex.year, &ex.month, | 145 if (sscanf(timestr.c_str(), kDumpTimeFormat, &ex.year, &ex.month, |
| 146 &ex.day_of_month, &ex.hour, &ex.minute, &ex.second) < 6) { | 146 &ex.day_of_month, &ex.hour, &ex.minute, &ex.second) < 6) { |
| 147 LOG(INFO) << "Failed to convert dump time invalid"; | 147 LOG(INFO) << "Failed to convert dump time invalid"; |
| 148 return false; | 148 return false; |
| 149 } | 149 } |
| 150 | 150 |
| 151 dump_time_ = base::Time::FromLocalExploded(ex); | 151 return base::Time::FromLocalExploded(ex, &dump_time_); |
| 152 return true; | |
| 153 } | 152 } |
| 154 | 153 |
| 155 } // namespace chromecast | 154 } // namespace chromecast |
| OLD | NEW |