Clean up extension confirmation prompts and make them consistent between Views and...
[chromium-blink-merge.git] / components / metrics / histogram_encoder.h
blob015119452a5b5bc9c33964ef0d6e3eea84dd3109
1 // Copyright 2014 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.
5 // This file defines an utility function that records any changes in a given
6 // histogram for transmission.
8 #ifndef COMPONENTS_METRICS_HISTOGRAM_ENCODER_H_
9 #define COMPONENTS_METRICS_HISTOGRAM_ENCODER_H_
11 #include <string>
13 #include "base/basictypes.h"
14 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h"
16 namespace base {
17 class HistogramSamples;
20 namespace metrics {
22 // Record any changes (histogram deltas of counts from |snapshot|) into
23 // |uma_proto| for the given histogram (|histogram_name|).
24 void EncodeHistogramDelta(const std::string& histogram_name,
25 const base::HistogramSamples& snapshot,
26 ChromeUserMetricsExtension* uma_proto);
28 } // namespace metrics
30 #endif // COMPONENTS_METRICS_HISTOGRAM_ENCODER_H_