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

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: Cleaned up 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
« no previous file with comments | « sync/sessions/directory_type_debug_info_emitter.cc ('k') | sync/sessions/model_type_registry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/model_type_registry.cc
diff --git a/sync/sessions/model_type_registry.cc b/sync/sessions/model_type_registry.cc
index 03a0736b0be6744afe596b09c82d5d0780e17b6b..5806522470a0d7ca2d0fb7d7dbd099a388e22fd6 100644
--- a/sync/sessions/model_type_registry.cc
+++ b/sync/sessions/model_type_registry.cc
@@ -5,6 +5,7 @@
#include "sync/sessions/model_type_registry.h"
#include <stddef.h>
+#include <utility>
#include "base/bind.h"
#include "base/observer_list.h"
@@ -147,15 +148,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());
@@ -164,7 +165,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());
« no previous file with comments | « sync/sessions/directory_type_debug_info_emitter.cc ('k') | sync/sessions/model_type_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698