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

Unified Diff: components/sync/engine/net/http_bridge.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/engine/net/http_bridge.cc
diff --git a/components/sync/engine/net/http_bridge.cc b/components/sync/engine/net/http_bridge.cc
index fccf140493572386c8c6a2fd78bf8851e138afee..cd605e807f79d7be40ef467b7e788ceea18cbe13 100644
--- a/components/sync/engine/net/http_bridge.cc
+++ b/components/sync/engine/net/http_bridge.cc
@@ -10,6 +10,7 @@
#include "base/bit_cast.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
#include "base/single_thread_task_runner.h"
@@ -223,7 +224,8 @@ void HttpBridge::MakeAsynchronousPost() {
// Start the timer on the network thread (the same thread progress is made
// on, and on which the url fetcher lives).
DCHECK(!fetch_state_.http_request_timeout_timer.get());
- fetch_state_.http_request_timeout_timer.reset(new base::Timer(false, false));
+ fetch_state_.http_request_timeout_timer =
+ base::MakeUnique<base::Timer>(false, false);
fetch_state_.http_request_timeout_timer->Start(
FROM_HERE, base::TimeDelta::FromSeconds(kMaxHttpRequestTimeSeconds),
base::Bind(&HttpBridge::OnURLFetchTimedOut, this));
« no previous file with comments | « components/sync/engine/fake_sync_manager.cc ('k') | components/sync/engine_impl/apply_control_data_updates_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698