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

Unified Diff: components/rappor/sampler.h

Issue 1921923002: Convert //components/[o-t]* 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
« no previous file with comments | « components/rappor/rappor_service_unittest.cc ('k') | components/rappor/sampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/sampler.h
diff --git a/components/rappor/sampler.h b/components/rappor/sampler.h
index dac87416be5e4570cd100f96a61e43dfc43e5082..8059de44c7129c195ee103ab9bfdc1f14f6ece42 100644
--- a/components/rappor/sampler.h
+++ b/components/rappor/sampler.h
@@ -6,11 +6,11 @@
#define COMPONENTS_RAPPOR_SAMPLER_H_
#include <map>
+#include <memory>
#include <string>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "components/rappor/rappor_parameters.h"
#include "components/rappor/sample.h"
@@ -30,7 +30,8 @@ class Sampler {
// Store this sample for metric name, randomly selecting a sample if
// others have already been recorded.
- void AddSample(const std::string& metric_name, scoped_ptr<Sample> sample);
+ void AddSample(const std::string& metric_name,
+ std::unique_ptr<Sample> sample);
// Generate randomized reports for all stored samples and store them
// in |reports|, then discard the samples.
@@ -41,7 +42,7 @@ class Sampler {
std::map<std::string, int> sample_counts_;
// Stores a Sample for each metric, by metric name.
- base::ScopedPtrHashMap<std::string, scoped_ptr<Sample>> samples_;
+ base::ScopedPtrHashMap<std::string, std::unique_ptr<Sample>> samples_;
DISALLOW_COPY_AND_ASSIGN(Sampler);
};
« no previous file with comments | « components/rappor/rappor_service_unittest.cc ('k') | components/rappor/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698