| Index: components/metrics/serialization/metric_sample.h
|
| diff --git a/components/metrics/serialization/metric_sample.h b/components/metrics/serialization/metric_sample.h
|
| index 247d2e9965347f86502be64ba1c82f0647d8b5c7..5a64c418a2b52676a53471f5105970a24010193f 100644
|
| --- a/components/metrics/serialization/metric_sample.h
|
| +++ b/components/metrics/serialization/metric_sample.h
|
| @@ -5,10 +5,10 @@
|
| #ifndef COMPONENTS_METRICS_SERIALIZATION_METRIC_SAMPLE_H_
|
| #define COMPONENTS_METRICS_SERIALIZATION_METRIC_SAMPLE_H_
|
|
|
| +#include <memory>
|
| #include <string>
|
|
|
| #include "base/macros.h"
|
| -#include "base/memory/scoped_ptr.h"
|
|
|
| namespace metrics {
|
|
|
| @@ -58,37 +58,37 @@ class MetricSample {
|
| std::string ToString() const;
|
|
|
| // Builds a crash sample.
|
| - static scoped_ptr<MetricSample> CrashSample(const std::string& crash_name);
|
| + static std::unique_ptr<MetricSample> CrashSample(
|
| + const std::string& crash_name);
|
|
|
| // Builds a histogram sample.
|
| - static scoped_ptr<MetricSample> HistogramSample(
|
| + static std::unique_ptr<MetricSample> HistogramSample(
|
| const std::string& histogram_name,
|
| int sample,
|
| int min,
|
| int max,
|
| int bucket_count);
|
| // Deserializes a histogram sample.
|
| - static scoped_ptr<MetricSample> ParseHistogram(const std::string& serialized);
|
| + static std::unique_ptr<MetricSample> ParseHistogram(
|
| + const std::string& serialized);
|
|
|
| // Builds a sparse histogram sample.
|
| - static scoped_ptr<MetricSample> SparseHistogramSample(
|
| + static std::unique_ptr<MetricSample> SparseHistogramSample(
|
| const std::string& histogram_name,
|
| int sample);
|
| // Deserializes a sparse histogram sample.
|
| - static scoped_ptr<MetricSample> ParseSparseHistogram(
|
| + static std::unique_ptr<MetricSample> ParseSparseHistogram(
|
| const std::string& serialized);
|
|
|
| // Builds a linear histogram sample.
|
| - static scoped_ptr<MetricSample> LinearHistogramSample(
|
| - const std::string& histogram_name,
|
| - int sample,
|
| - int max);
|
| + static std::unique_ptr<MetricSample>
|
| + LinearHistogramSample(const std::string& histogram_name, int sample, int max);
|
| // Deserializes a linear histogram sample.
|
| - static scoped_ptr<MetricSample> ParseLinearHistogram(
|
| + static std::unique_ptr<MetricSample> ParseLinearHistogram(
|
| const std::string& serialized);
|
|
|
| // Builds a user action sample.
|
| - static scoped_ptr<MetricSample> UserActionSample(
|
| + static std::unique_ptr<MetricSample> UserActionSample(
|
| const std::string& action_name);
|
|
|
| // Returns true if sample and this object represent the same sample (type,
|
|
|