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

Unified Diff: components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc

Issue 1912433002: Convert //components/proximity_auth from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc
diff --git a/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc b/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc
index a62fb3fd536cc1ef73e540600d5be24f2c54c3e7..33983512581e49485a4dbc670845dab8738ad885 100644
--- a/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc
+++ b/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/timer/mock_timer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -57,11 +58,11 @@ class TestSyncSchedulerImpl : public SyncSchedulerImpl {
base::MockTimer* timer() { return mock_timer_; }
private:
- scoped_ptr<base::Timer> CreateTimer() override {
+ std::unique_ptr<base::Timer> CreateTimer() override {
bool retain_user_task = false;
bool is_repeating = false;
mock_timer_ = new base::MockTimer(retain_user_task, is_repeating);
- return make_scoped_ptr(mock_timer_);
+ return base::WrapUnique(mock_timer_);
}
// A timer instance for testing. Owned by the parent scheduler.
@@ -88,7 +89,7 @@ class ProximityAuthSyncSchedulerImplTest : public testing::Test,
~ProximityAuthSyncSchedulerImplTest() override {}
void OnSyncRequested(
- scoped_ptr<SyncScheduler::SyncRequest> sync_request) override {
+ std::unique_ptr<SyncScheduler::SyncRequest> sync_request) override {
sync_request_ = std::move(sync_request);
}
@@ -100,9 +101,9 @@ class ProximityAuthSyncSchedulerImplTest : public testing::Test,
base::TimeDelta zero_elapsed_time_;
// The scheduler instance under test.
- scoped_ptr<TestSyncSchedulerImpl> scheduler_;
+ std::unique_ptr<TestSyncSchedulerImpl> scheduler_;
- scoped_ptr<SyncScheduler::SyncRequest> sync_request_;
+ std::unique_ptr<SyncScheduler::SyncRequest> sync_request_;
DISALLOW_COPY_AND_ASSIGN(ProximityAuthSyncSchedulerImplTest);
};

Powered by Google App Engine
This is Rietveld 408576698