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

Unified Diff: sync/internal_api/attachments/attachment_service_proxy_for_test.cc

Issue 1866243002: Convert //sync 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: sync/internal_api/attachments/attachment_service_proxy_for_test.cc
diff --git a/sync/internal_api/attachments/attachment_service_proxy_for_test.cc b/sync/internal_api/attachments/attachment_service_proxy_for_test.cc
index fa8756b7c276ecd2b9c3bddd1408bf153f589610..92fcd954b5963896dc32382e5eedbb98d29d8fe2 100644
--- a/sync/internal_api/attachments/attachment_service_proxy_for_test.cc
+++ b/sync/internal_api/attachments/attachment_service_proxy_for_test.cc
@@ -13,8 +13,8 @@
namespace syncer {
AttachmentServiceProxyForTest::OwningCore::OwningCore(
- scoped_ptr<AttachmentService> wrapped,
- scoped_ptr<base::WeakPtrFactory<AttachmentService>> weak_ptr_factory)
+ std::unique_ptr<AttachmentService> wrapped,
+ std::unique_ptr<base::WeakPtrFactory<AttachmentService>> weak_ptr_factory)
: Core(weak_ptr_factory->GetWeakPtr()),
wrapped_(std::move(wrapped)),
weak_ptr_factory_(std::move(weak_ptr_factory)) {
@@ -26,7 +26,8 @@ AttachmentServiceProxyForTest::OwningCore::~OwningCore() {
// Static.
AttachmentServiceProxy AttachmentServiceProxyForTest::Create() {
- scoped_ptr<AttachmentService> wrapped(AttachmentServiceImpl::CreateForTest());
+ std::unique_ptr<AttachmentService> wrapped(
+ AttachmentServiceImpl::CreateForTest());
// This class's base class, AttachmentServiceProxy, must be initialized with a
// WeakPtr to an AttachmentService. Because the base class ctor must be
// invoked before any of this class's members are initialized, we create the
@@ -34,7 +35,7 @@ AttachmentServiceProxy AttachmentServiceProxyForTest::Create() {
// base class and own the WeakPtrFactory.
//
// We must pass by scoped_ptr because WeakPtrFactory has no copy constructor.
- scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory(
+ std::unique_ptr<base::WeakPtrFactory<AttachmentService>> weak_ptr_factory(
new base::WeakPtrFactory<AttachmentService>(wrapped.get()));
scoped_refptr<Core> core_for_test(

Powered by Google App Engine
This is Rietveld 408576698