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

Unified Diff: components/policy/core/common/remote_commands/remote_commands_service.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/policy/core/common/remote_commands/remote_commands_service.cc
diff --git a/components/policy/core/common/remote_commands/remote_commands_service.cc b/components/policy/core/common/remote_commands/remote_commands_service.cc
index 4541f655dd2535ed2e00605a4d5cc834eb34b559..da7c79a2554622133949cdd8caddf1200e90ff79 100644
--- a/components/policy/core/common/remote_commands/remote_commands_service.cc
+++ b/components/policy/core/common/remote_commands/remote_commands_service.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/logging.h"
@@ -21,7 +22,7 @@ namespace em = enterprise_management;
RemoteCommandsService::RemoteCommandsService(
scoped_ptr<RemoteCommandsFactory> factory,
CloudPolicyClient* client)
- : factory_(factory.Pass()), client_(client), weak_factory_(this) {
+ : factory_(std::move(factory)), client_(client), weak_factory_(this) {
DCHECK(client_);
queue_.AddObserver(this);
}
@@ -62,7 +63,7 @@ bool RemoteCommandsService::FetchRemoteCommands() {
}
client_->FetchRemoteCommands(
- id_to_acknowledge.Pass(), previous_results,
+ std::move(id_to_acknowledge), previous_results,
base::Bind(&RemoteCommandsService::OnRemoteCommandsFetched,
weak_factory_.GetWeakPtr()));
@@ -71,7 +72,7 @@ bool RemoteCommandsService::FetchRemoteCommands() {
void RemoteCommandsService::SetClockForTesting(
scoped_ptr<base::TickClock> clock) {
- queue_.SetClockForTesting(clock.Pass());
+ queue_.SetClockForTesting(std::move(clock));
}
void RemoteCommandsService::EnqueueCommand(
@@ -100,7 +101,7 @@ void RemoteCommandsService::EnqueueCommand(
return;
}
- queue_.AddJob(job.Pass());
+ queue_.AddJob(std::move(job));
}
void RemoteCommandsService::OnJobStarted(RemoteCommandJob* command) {

Powered by Google App Engine
This is Rietveld 408576698