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

Unified Diff: components/rappor/test_rappor_service.cc

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/test_rappor_service.h ('k') | components/renderer_context_menu/context_menu_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/test_rappor_service.cc
diff --git a/components/rappor/test_rappor_service.cc b/components/rappor/test_rappor_service.cc
index fb242020b903168fe35e7f1361afa27875a620ed..edd51c3f2d9a3435f4372162ec148ca0533de64e 100644
--- a/components/rappor/test_rappor_service.cc
+++ b/components/rappor/test_rappor_service.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "components/rappor/byte_vector_utils.h"
#include "components/rappor/proto/rappor_metric.pb.h"
#include "components/rappor/rappor_parameters.h"
@@ -57,22 +58,21 @@ TestRapporService::TestRapporService()
is_incognito_(false) {
RegisterPrefs(test_prefs_.registry());
test_uploader_ = new TestLogUploader();
- InitializeInternal(make_scoped_ptr(test_uploader_),
- 0,
+ InitializeInternal(base::WrapUnique(test_uploader_), 0,
HmacByteVectorGenerator::GenerateEntropyInput());
Update(UMA_RAPPOR_GROUP | SAFEBROWSING_RAPPOR_GROUP, true);
}
TestRapporService::~TestRapporService() {}
-scoped_ptr<Sample> TestRapporService::CreateSample(RapporType type) {
- scoped_ptr<TestSample> test_sample(new TestSample(type));
+std::unique_ptr<Sample> TestRapporService::CreateSample(RapporType type) {
+ std::unique_ptr<TestSample> test_sample(new TestSample(type));
return std::move(test_sample);
}
// Intercepts the sample being recorded and saves it in a test structure.
void TestRapporService::RecordSampleObj(const std::string& metric_name,
- scoped_ptr<Sample> sample) {
+ std::unique_ptr<Sample> sample) {
TestSample* test_sample = static_cast<TestSample*>(sample.get());
// Erase the previous sample if we logged one.
shadows_.erase(metric_name);
« no previous file with comments | « components/rappor/test_rappor_service.h ('k') | components/renderer_context_menu/context_menu_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698