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

Unified Diff: components/history/core/browser/history_service.cc

Issue 2521063004: Replace ptr.reset with std::move in src/components (Closed)
Patch Set: Created 4 years, 1 month 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/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index a97677666b691d765a49bbc921453c2bdda7d277..2ff3e2318e779a1f2985ba1f2b0309719d0a091d 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -968,7 +968,7 @@ void HistoryService::SetInMemoryBackend(
std::unique_ptr<InMemoryHistoryBackend> mem_backend) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!in_memory_backend_) << "Setting mem DB twice";
- in_memory_backend_.reset(mem_backend.release());
+ in_memory_backend_ = std::move(mem_backend);
// The database requires additional initialization once we own it.
in_memory_backend_->AttachToHistoryService(this);
« no previous file with comments | « components/dom_distiller/core/dom_distiller_store.cc ('k') | components/leveldb_proto/proto_database_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698