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

Unified Diff: components/rappor/sampler.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/sampler.cc
diff --git a/components/rappor/sampler.cc b/components/rappor/sampler.cc
index 5d3e8e3c0e6c08471dcae07b414b674b3ed60e8a..9ad0da95880e8d6f37a9dc60af46e8b694c2fdb4 100644
--- a/components/rappor/sampler.cc
+++ b/components/rappor/sampler.cc
@@ -6,6 +6,7 @@
#include <map>
#include <string>
+#include <utility>
#include "base/rand_util.h"
@@ -23,7 +24,7 @@ void Sampler::AddSample(const std::string& metric_name,
// Replace the previous sample with a 1 in sample_count_ chance so that each
// sample has equal probability of being reported.
if (base::RandGenerator(sample_counts_[metric_name]) == 0)
- samples_.set(metric_name, sample.Pass());
+ samples_.set(metric_name, std::move(sample));
}
void Sampler::ExportMetrics(const std::string& secret, RapporReports* reports) {
« no previous file with comments | « components/rappor/rappor_service_unittest.cc ('k') | components/rappor/sampler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698