summaryrefslogtreecommitdiffstats
path: root/chrome/common/metrics/metrics_service_base.cc
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 02:35:44 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 02:35:44 +0000
commite182be01e1e6f8db4644ed4e8fc28b2cf8d981f4 (patch)
tree79577e39b5d98372b99a20112585df522f78b88d /chrome/common/metrics/metrics_service_base.cc
parent863f70aa8b46421f442a089b21e1bd97a446785c (diff)
downloadchromium_src-e182be01e1e6f8db4644ed4e8fc28b2cf8d981f4.zip
chromium_src-e182be01e1e6f8db4644ed4e8fc28b2cf8d981f4.tar.gz
chromium_src-e182be01e1e6f8db4644ed4e8fc28b2cf8d981f4.tar.bz2
Separate chrome/common/metrics/metrics_helpers.{h,cc} into files for the constituent classes.
BUG=none TEST=none (code cleanup) TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/9159004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/metrics/metrics_service_base.cc')
-rw-r--r--chrome/common/metrics/metrics_service_base.cc43
1 files changed, 43 insertions, 0 deletions
diff --git a/chrome/common/metrics/metrics_service_base.cc b/chrome/common/metrics/metrics_service_base.cc
new file mode 100644
index 0000000..f6471f3
--- /dev/null
+++ b/chrome/common/metrics/metrics_service_base.cc
@@ -0,0 +1,43 @@
+// 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/common/metrics/metrics_service_base.h"
+
+#include <cstdlib>
+
+#include "chrome/common/metrics/metrics_log_base.h"
+
+using base::Histogram;
+
+MetricsServiceBase::MetricsServiceBase() {
+}
+
+MetricsServiceBase::~MetricsServiceBase() {
+}
+
+void MetricsServiceBase::RecordCurrentHistograms() {
+ DCHECK(log_manager_.current_log());
+ TransmitAllHistograms(base::Histogram::kNoFlags, true);
+}
+
+void MetricsServiceBase::TransmitHistogramDelta(
+ const base::Histogram& histogram,
+ const base::Histogram::SampleSet& snapshot) {
+ log_manager_.current_log()->RecordHistogramDelta(histogram, snapshot);
+}
+
+void MetricsServiceBase::InconsistencyDetected(int problem) {
+ UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowser",
+ problem, Histogram::NEVER_EXCEEDED_VALUE);
+}
+
+void MetricsServiceBase::UniqueInconsistencyDetected(int problem) {
+ UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique",
+ problem, Histogram::NEVER_EXCEEDED_VALUE);
+}
+
+void MetricsServiceBase::SnapshotProblemResolved(int amount) {
+ UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser",
+ std::abs(amount));
+}