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

Unified Diff: components/sync_sessions/sessions_sync_manager.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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: components/sync_sessions/sessions_sync_manager.cc
diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc
index 48ab5ed62082161ec79a1ca647f7364eb4947fab..0b9eb7e56112aa0ea852985ad699a5ec55a7435e 100644
--- a/components/sync_sessions/sessions_sync_manager.cc
+++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -5,6 +5,7 @@
#include "components/sync_sessions/sessions_sync_manager.h"
#include <algorithm>
+#include <utility>
#include "base/metrics/field_trial.h"
#include "build/build_config.h"
@@ -79,11 +80,10 @@ SessionsSyncManager::SessionsSyncManager(
local_device_(local_device),
local_session_header_node_id_(TabNodePool::kInvalidTabNodeID),
stale_session_threshold_days_(kDefaultStaleSessionThresholdDays),
- local_event_router_(router.Pass()),
+ local_event_router_(std::move(router)),
page_revisit_broadcaster_(this, sessions_client),
sessions_updated_callback_(sessions_updated_callback),
- datatype_refresh_callback_(datatype_refresh_callback) {
-}
+ datatype_refresh_callback_(datatype_refresh_callback) {}
SessionsSyncManager::~SessionsSyncManager() {}
@@ -104,8 +104,8 @@ syncer::SyncMergeResult SessionsSyncManager::MergeDataAndStartSyncing(
DCHECK(session_tracker_.Empty());
DCHECK_EQ(0U, local_tab_pool_.Capacity());
- error_handler_ = error_handler.Pass();
- sync_processor_ = sync_processor.Pass();
+ error_handler_ = std::move(error_handler);
+ sync_processor_ = std::move(sync_processor);
local_session_header_node_id_ = TabNodePool::kInvalidTabNodeID;
@@ -351,12 +351,12 @@ void SessionsSyncManager::AssociateTab(SyncedTabDelegate* const tab,
void SessionsSyncManager::RebuildAssociations() {
syncer::SyncDataList data(sync_processor_->GetAllSyncData(syncer::SESSIONS));
- scoped_ptr<syncer::SyncErrorFactory> error_handler(error_handler_.Pass());
- scoped_ptr<syncer::SyncChangeProcessor> processor(sync_processor_.Pass());
+ scoped_ptr<syncer::SyncErrorFactory> error_handler(std::move(error_handler_));
+ scoped_ptr<syncer::SyncChangeProcessor> processor(std::move(sync_processor_));
StopSyncing(syncer::SESSIONS);
- MergeDataAndStartSyncing(syncer::SESSIONS, data, processor.Pass(),
- error_handler.Pass());
+ MergeDataAndStartSyncing(syncer::SESSIONS, data, std::move(processor),
+ std::move(error_handler));
}
bool SessionsSyncManager::IsValidSessionHeader(
« no previous file with comments | « components/sync_sessions/revisit/sessions_page_revisit_observer.cc ('k') | components/syncable_prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698