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

Unified Diff: components/update_client/update_client.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/update_client/update_client.cc
diff --git a/components/update_client/update_client.cc b/components/update_client/update_client.cc
index 497fedb7b8b8b6b450f7d75f38b100d130eed805..fd524e07311813acff9cf1902f64a61f976ee17a 100644
--- a/components/update_client/update_client.cc
+++ b/components/update_client/update_client.cc
@@ -70,7 +70,7 @@ UpdateClientImpl::UpdateClientImpl(
CrxDownloader::Factory crx_downloader_factory)
: is_stopped_(false),
config_(config),
- ping_manager_(ping_manager.Pass()),
+ ping_manager_(std::move(ping_manager)),
update_engine_(
new UpdateEngine(config,
update_checker_factory,
@@ -109,7 +109,7 @@ void UpdateClientImpl::Install(const std::string& id,
crx_data_callback, callback));
// Install tasks are run concurrently and never queued up.
- RunTask(task.Pass());
+ RunTask(std::move(task));
}
void UpdateClientImpl::Update(const std::vector<std::string>& ids,
@@ -125,7 +125,7 @@ void UpdateClientImpl::Update(const std::vector<std::string>& ids,
// If no other tasks are running at the moment, run this update task.
// Otherwise, queue the task up.
if (tasks_.empty()) {
- RunTask(task.Pass());
+ RunTask(std::move(task));
} else {
task_queue_.push(task.release());
}
@@ -162,7 +162,7 @@ void UpdateClientImpl::OnTaskComplete(
// Pick up a task from the queue if the queue has pending tasks and no other
// task is running.
if (tasks_.empty() && !task_queue_.empty()) {
- RunTask(scoped_ptr<Task>(task_queue_.front()).Pass());
+ RunTask(scoped_ptr<Task>(task_queue_.front()));
task_queue_.pop();
}
}
@@ -229,7 +229,7 @@ void UpdateClientImpl::Stop() {
scoped_refptr<UpdateClient> UpdateClientFactory(
const scoped_refptr<Configurator>& config) {
scoped_ptr<PingManager> ping_manager(new PingManager(*config));
- return new UpdateClientImpl(config, ping_manager.Pass(),
+ return new UpdateClientImpl(config, std::move(ping_manager),
&UpdateChecker::Create, &CrxDownloader::Create);
}
« no previous file with comments | « components/update_client/update_checker_unittest.cc ('k') | components/update_client/update_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698