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

Unified Diff: components/sync_driver/non_blocking_data_type_controller.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_driver/non_blocking_data_type_controller.cc
diff --git a/components/sync_driver/non_blocking_data_type_controller.cc b/components/sync_driver/non_blocking_data_type_controller.cc
index 676045144572ce5f08868a3b869facadde675e04..4205115cdb92cf3b863b577436b26d250da93cbf 100644
--- a/components/sync_driver/non_blocking_data_type_controller.cc
+++ b/components/sync_driver/non_blocking_data_type_controller.cc
@@ -4,6 +4,8 @@
#include "components/sync_driver/non_blocking_data_type_controller.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
@@ -88,7 +90,7 @@ void NonBlockingDataTypeController::OnProcessorStarted(
if (BelongsToUIThread()) {
// Hold on to the activation context until ActivateDataType is called.
if (state_ == MODEL_STARTING) {
- activation_context_ = activation_context.Pass();
+ activation_context_ = std::move(activation_context);
}
// TODO(stanisc): Figure out if UNRECOVERABLE_ERROR is OK in this case.
ConfigureResult result = error.IsSet() ? UNRECOVERABLE_ERROR : OK;
@@ -97,7 +99,7 @@ void NonBlockingDataTypeController::OnProcessorStarted(
RunOnUIThread(
FROM_HERE,
base::Bind(&NonBlockingDataTypeController::OnProcessorStarted, this,
- error, base::Passed(activation_context.Pass())));
+ error, base::Passed(std::move(activation_context))));
}
}
@@ -119,7 +121,8 @@ void NonBlockingDataTypeController::ActivateDataType(
DCHECK(configurer);
DCHECK(activation_context_);
DCHECK_EQ(RUNNING, state_);
- configurer->ActivateNonBlockingDataType(type(), activation_context_.Pass());
+ configurer->ActivateNonBlockingDataType(type(),
+ std::move(activation_context_));
}
void NonBlockingDataTypeController::DeactivateDataType(

Powered by Google App Engine
This is Rietveld 408576698