blob: 79ed181248fc60e8d9e571e91331539ecfce252b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/performance_monitor/metric_info.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
namespace performance_monitor {
MetricInfo::MetricInfo() {
value = 0.0;
}
MetricInfo::MetricInfo(const base::Time& metric_time, double metric_value)
: time(metric_time),
value(metric_value) {
}
MetricInfo::MetricInfo(const std::string& metric_time,
const std::string& metric_value) {
int64 conversion = 0;
base::StringToInt64(metric_time, &conversion);
time = base::Time::FromInternalValue(conversion);
CHECK(base::StringToDouble(metric_value, &value));
}
MetricInfo::~MetricInfo() {
}
} // namespace performance_monitor
|