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

Unified Diff: sync/sessions/model_type_registry.cc

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: sync/sessions/model_type_registry.cc
diff --git a/sync/sessions/model_type_registry.cc b/sync/sessions/model_type_registry.cc
index b5f9654f1af8f7c60fec6db293865e3042d69f87..9979de5bad56a1593f2720603a3d3fbd8391d338 100644
--- a/sync/sessions/model_type_registry.cc
+++ b/sync/sessions/model_type_registry.cc
@@ -4,6 +4,8 @@
#include "sync/sessions/model_type_registry.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/observer_list.h"
#include "base/thread_task_runner_handle.h"
@@ -145,15 +147,15 @@ void ModelTypeRegistry::ConnectSyncTypeToWorker(
scoped_ptr<syncer_v2::ModelTypeWorker> worker(new syncer_v2::ModelTypeWorker(
type, activation_context->data_type_state,
- activation_context->saved_pending_updates, cryptographer_copy.Pass(),
- nudge_handler_, activation_context->type_processor.Pass()));
+ activation_context->saved_pending_updates, std::move(cryptographer_copy),
+ nudge_handler_, std::move(activation_context->type_processor)));
// Initialize Processor -> Worker communication channel.
scoped_ptr<syncer_v2::CommitQueue> commit_queue_proxy(new CommitQueueProxy(
worker->AsWeakPtr(), scoped_refptr<base::SequencedTaskRunner>(
base::ThreadTaskRunnerHandle::Get())));
- type_processor->OnConnect(commit_queue_proxy.Pass());
+ type_processor->OnConnect(std::move(commit_queue_proxy));
DCHECK(update_handler_map_.find(type) == update_handler_map_.end());
DCHECK(commit_contributor_map_.find(type) == commit_contributor_map_.end());
@@ -162,7 +164,7 @@ void ModelTypeRegistry::ConnectSyncTypeToWorker(
commit_contributor_map_.insert(std::make_pair(type, worker.get()));
// The container takes ownership.
- model_type_workers_.push_back(worker.Pass());
+ model_type_workers_.push_back(std::move(worker));
DCHECK(Intersection(GetEnabledDirectoryTypes(),
GetEnabledNonBlockingTypes()).Empty());

Powered by Google App Engine
This is Rietveld 408576698