Chromium Code Reviews| Index: components/metrics/metrics_log.cc |
| diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc |
| index 28ed57b177cfbd19be50308286e7e76e01ac9943..8764a739fcd6af29cff51e3f6f6022fd16bcbe2b 100644 |
| --- a/components/metrics/metrics_log.cc |
| +++ b/components/metrics/metrics_log.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/base64.h" |
| #include "base/basictypes.h" |
| +#include "base/build_time.h" |
| #include "base/cpu.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/metrics/histogram.h" |
| @@ -156,13 +157,8 @@ uint64 MetricsLog::Hash(const std::string& value) { |
| // static |
| int64 MetricsLog::GetBuildTime() { |
| static int64 integral_build_time = 0; |
| - if (!integral_build_time) { |
| - base::Time time; |
| - static const char kDateTime[] = __DATE__ " " __TIME__ " GMT"; |
|
M-A Ruel
2014/10/31 14:09:14
Note that the PST / GMT difference was pure hack;
|
| - bool result = base::Time::FromString(kDateTime, &time); |
| - DCHECK(result); |
| - integral_build_time = static_cast<int64>(time.ToTimeT()); |
| - } |
| + if (!integral_build_time) |
| + integral_build_time = static_cast<int64>(base::GetBuildTime().ToTimeT()); |
| return integral_build_time; |
| } |