Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: chrome/browser/performance_monitor/metric_info.cc

Issue 10860017: Refactor Metrics (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed DCHECK Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/performance_monitor/metric_info.h"
6
7 #include "base/logging.h"
8 #include "base/string_number_conversions.h"
9
10 namespace performance_monitor {
11
12 MetricInfo::MetricInfo() {
13 value = 0.0;
14 }
15
16 MetricInfo::MetricInfo(const base::Time& metric_time, double metric_value)
17 : time(metric_time),
18 value(metric_value) {
19 }
20
21 MetricInfo::MetricInfo(const std::string& metric_time,
22 const std::string& metric_value) {
23 int64 conversion = 0;
24 base::StringToInt64(metric_time, &conversion);
25 time = base::Time::FromInternalValue(conversion);
26 CHECK(base::StringToDouble(metric_value, &value));
27 }
28
29 MetricInfo::~MetricInfo() {
30 }
31
32 } // namespace performance_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698