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

Unified Diff: components/metrics/serialization/metric_sample.h

Issue 1906173002: Convert //components/metrics from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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,
« no previous file with comments | « components/metrics/profiler/tracking_synchronizer_unittest.cc ('k') | components/metrics/serialization/metric_sample.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698