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

Unified Diff: components/sync/model/sync_error.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/sync_error.cc
diff --git a/components/sync/model/sync_error.cc b/components/sync/model/sync_error.cc
index b2010af2e3e71bdd45557c4635e10bbdcad27ccf..ef3de5f507f53c2011d7e4f1aa6f861c60a31cc4 100644
--- a/components/sync/model/sync_error.cc
+++ b/components/sync/model/sync_error.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
namespace syncer {
@@ -65,7 +66,7 @@ void SyncError::Init(const tracked_objects::Location& location,
const std::string& message,
ModelType model_type,
ErrorType error_type) {
- location_.reset(new tracked_objects::Location(location));
+ location_ = base::MakeUnique<tracked_objects::Location>(location);
message_ = message;
model_type_ = model_type;
error_type_ = error_type;
« no previous file with comments | « components/sync/model/fake_model_type_service.cc ('k') | components/sync/model_impl/attachments/attachment_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698