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

Unified Diff: components/sync/syncable/directory_backing_store.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/syncable/directory_backing_store.cc
diff --git a/components/sync/syncable/directory_backing_store.cc b/components/sync/syncable/directory_backing_store.cc
index dab08717b584143c191059b645b9ca98dfe9eb8e..02b3fd9090cab212ae876d07f41d8bf49ba003e0 100644
--- a/components/sync/syncable/directory_backing_store.cc
+++ b/components/sync/syncable/directory_backing_store.cc
@@ -13,6 +13,7 @@
#include "base/base64.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
#include "base/single_thread_task_runner.h"
@@ -1743,7 +1744,7 @@ bool DirectoryBackingStore::needs_column_refresh() const {
}
void DirectoryBackingStore::ResetAndCreateConnection() {
- db_.reset(new sql::Connection());
+ db_ = base::MakeUnique<sql::Connection>();
db_->set_histogram_tag("SyncDirectory");
db_->set_exclusive_locking();
db_->set_cache_size(32);
« no previous file with comments | « components/sync/model_impl/shared_model_type_processor_unittest.cc ('k') | components/sync/syncable/directory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698