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

Unified Diff: components/sync/model_impl/attachments/task_queue.h

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/task_queue.h
diff --git a/components/sync/model_impl/attachments/task_queue.h b/components/sync/model_impl/attachments/task_queue.h
index d2966fa5ae67d23029aa98ff7a36e548a8250834..2a686608e3709a37a25dd56ca844b04328508c7b 100644
--- a/components/sync/model_impl/attachments/task_queue.h
+++ b/components/sync/model_impl/attachments/task_queue.h
@@ -15,6 +15,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -183,10 +184,10 @@ TaskQueue<T>::TaskQueue(const HandleTaskCallback& callback,
backoff_policy_.maximum_backoff_ms = max_backoff_delay.InMilliseconds();
backoff_policy_.entry_lifetime_ms = -1;
backoff_policy_.always_use_initial_delay = false;
- backoff_entry_.reset(new net::BackoffEntry(&backoff_policy_));
+ backoff_entry_ = base::MakeUnique<net::BackoffEntry>(&backoff_policy_);
dispatch_closure_ =
base::Bind(&TaskQueue::Dispatch, weak_ptr_factory_.GetWeakPtr());
- backoff_timer_.reset(new base::Timer(false, false));
+ backoff_timer_ = base::MakeUnique<base::Timer>(false, false);
}
template <typename T>

Powered by Google App Engine
This is Rietveld 408576698