diff options
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/boot_times_loader.cc | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/cros/cros_library_loader.cc | 10 | ||||
-rw-r--r-- | chrome/browser/chromeos/external_metrics.cc | 6 |
3 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc index 4e08290..03359cf 100644 --- a/chrome/browser/chromeos/boot_times_loader.cc +++ b/chrome/browser/chromeos/boot_times_loader.cc @@ -259,7 +259,7 @@ void BootTimesLoader::WriteTimes( base::Time first = login_times.front().time(); base::Time last = login_times.back().time(); base::TimeDelta total = last - first; - scoped_refptr<base::Histogram>total_hist = base::Histogram::FactoryTimeGet( + base::Histogram* total_hist = base::Histogram::FactoryTimeGet( uma_name, base::TimeDelta::FromMilliseconds(kMinTimeMillis), base::TimeDelta::FromMilliseconds(kMaxTimeMillis), @@ -277,7 +277,7 @@ void BootTimesLoader::WriteTimes( if (tm.send_to_uma()) { name = uma_prefix + tm.name(); - scoped_refptr<base::Histogram>prev_hist = base::Histogram::FactoryTimeGet( + base::Histogram* prev_hist = base::Histogram::FactoryTimeGet( name, base::TimeDelta::FromMilliseconds(kMinTimeMillis), base::TimeDelta::FromMilliseconds(kMaxTimeMillis), diff --git a/chrome/browser/chromeos/cros/cros_library_loader.cc b/chrome/browser/chromeos/cros/cros_library_loader.cc index d631a6c..660bc2c 100644 --- a/chrome/browser/chromeos/cros/cros_library_loader.cc +++ b/chrome/browser/chromeos/cros/cros_library_loader.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -22,16 +22,14 @@ void addLibcrosTimeHistogram(const char* name, const base::TimeDelta& delta) { static const base::TimeDelta max_time = base::TimeDelta::FromSeconds(1); const size_t bucket_count(10); DCHECK(name); - scoped_refptr<base::Histogram> counter = base::Histogram::FactoryTimeGet( + base::Histogram* counter = base::Histogram::FactoryTimeGet( std::string(name), min_time, max_time, bucket_count, base::Histogram::kNoFlags); - if (counter.get()) { - counter->AddTime(delta); - VLOG(1) << "Cros Time: " << name << ": " << delta.InMilliseconds() << "ms."; - } + counter->AddTime(delta); + VLOG(1) << "Cros Time: " << name << ": " << delta.InMilliseconds() << "ms."; } } // namespace diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc index edd48c0..830de18 100644 --- a/chrome/browser/chromeos/external_metrics.cc +++ b/chrome/browser/chromeos/external_metrics.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -86,7 +86,7 @@ void ExternalMetrics::RecordHistogram(const char* histogram_data) { } // Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram // instance and thus only work if |name| is constant. - scoped_refptr<base::Histogram> counter = base::Histogram::FactoryGet( + base::Histogram* counter = base::Histogram::FactoryGet( name, min, max, nbuckets, base::Histogram::kUmaTargetedHistogramFlag); counter->Add(sample); } @@ -101,7 +101,7 @@ void ExternalMetrics::RecordLinearHistogram(const char* histogram_data) { } // Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram // instance and thus only work if |name| is constant. - scoped_refptr<base::Histogram> counter = base::LinearHistogram::FactoryGet( + base::Histogram* counter = base::LinearHistogram::FactoryGet( name, 1, max, max + 1, base::Histogram::kUmaTargetedHistogramFlag); counter->Add(sample); } |