Index: components/sync/driver/generic_change_processor.cc |
diff --git a/components/sync/driver/generic_change_processor.cc b/components/sync/driver/generic_change_processor.cc |
index bb2d4bd5636a65796d8ed5e6086e383edb5bb30e..a2d3506bb6d737356146fb867828670a4dd120ee 100644 |
--- a/components/sync/driver/generic_change_processor.cc |
+++ b/components/sync/driver/generic_change_processor.cc |
@@ -10,6 +10,7 @@ |
#include <utility> |
#include "base/location.h" |
+#include "base/memory/ptr_util.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/threading/thread_task_runner_handle.h" |
@@ -130,8 +131,9 @@ GenericChangeProcessor::GenericChangeProcessor( |
sync_client->GetSyncApiComponentFactory()->CreateAttachmentService( |
std::move(attachment_store), *user_share, store_birthday, type, |
this); |
- attachment_service_weak_ptr_factory_.reset( |
- new base::WeakPtrFactory<AttachmentService>(attachment_service_.get())); |
+ attachment_service_weak_ptr_factory_ = |
+ base::MakeUnique<base::WeakPtrFactory<AttachmentService>>( |
+ attachment_service_.get()); |
attachment_service_proxy_ = AttachmentServiceProxy( |
base::ThreadTaskRunnerHandle::Get(), |
attachment_service_weak_ptr_factory_->GetWeakPtr()); |
@@ -159,7 +161,7 @@ void GenericChangeProcessor::ApplyChangesFromSyncModel( |
std::unique_ptr<sync_pb::EntitySpecifics> specifics; |
if (it->specifics.has_password()) { |
DCHECK(it->extra.get()); |
- specifics.reset(new sync_pb::EntitySpecifics(it->specifics)); |
+ specifics = base::MakeUnique<sync_pb::EntitySpecifics>(it->specifics); |
specifics->mutable_password() |
->mutable_client_only_encrypted_data() |
->CopyFrom(it->extra->unencrypted()); |