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

Unified Diff: components/sync/model_impl/attachments/attachment_service_impl.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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/sync/model_impl/attachments/attachment_service_impl.cc
diff --git a/components/sync/model_impl/attachments/attachment_service_impl.cc b/components/sync/model_impl/attachments/attachment_service_impl.cc
index 2ca480476bcae56a5b25900bcab082d403dc2d4a..695e8e41e380aa338b275e6ba66659589eabdc71 100644
--- a/components/sync/model_impl/attachments/attachment_service_impl.cc
+++ b/components/sync/model_impl/attachments/attachment_service_impl.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
@@ -129,10 +130,10 @@ AttachmentServiceImpl::AttachmentServiceImpl(
// network becomes disconnected, consider suspending queue dispatch. When
// connectivity is restored, consider clearing any dispatch backoff (bug
// 411981).
- upload_task_queue_.reset(new TaskQueue<AttachmentId>(
+ upload_task_queue_ = base::MakeUnique<TaskQueue<AttachmentId>>(
base::Bind(&AttachmentServiceImpl::BeginUpload,
weak_ptr_factory_.GetWeakPtr()),
- initial_backoff_delay, max_backoff_delay));
+ initial_backoff_delay, max_backoff_delay);
net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
}
« no previous file with comments | « components/sync/model/sync_error.cc ('k') | components/sync/model_impl/attachments/attachment_service_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698