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

Unified Diff: content/child/shared_memory_data_consumer_handle.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/child/shared_memory_data_consumer_handle.cc
diff --git a/content/child/shared_memory_data_consumer_handle.cc b/content/child/shared_memory_data_consumer_handle.cc
index 81b368d27d0585492bbb9396a795a6a52cffbe58..b7e4d11cbe54a6d2c2e82acd49176df367cb1e6f 100644
--- a/content/child/shared_memory_data_consumer_handle.cc
+++ b/content/child/shared_memory_data_consumer_handle.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <deque>
+#include <utility>
#include "base/bind.h"
#include "base/macros.h"
@@ -24,7 +25,8 @@ class DelegateThreadSafeReceivedData final
public:
explicit DelegateThreadSafeReceivedData(
scoped_ptr<RequestPeer::ReceivedData> data)
- : data_(data.Pass()), task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
+ : data_(std::move(data)),
+ task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
~DelegateThreadSafeReceivedData() override {
if (!task_runner_->BelongsToCurrentThread()) {
// Delete the data on the original thread.
@@ -303,11 +305,11 @@ void SharedMemoryDataConsumerHandle::Writer::AddData(
scoped_ptr<RequestPeer::ThreadSafeReceivedData> data_to_pass;
if (mode_ == kApplyBackpressure) {
data_to_pass =
- make_scoped_ptr(new DelegateThreadSafeReceivedData(data.Pass()));
+ make_scoped_ptr(new DelegateThreadSafeReceivedData(std::move(data)));
} else {
data_to_pass = make_scoped_ptr(new FixedReceivedData(data.get()));
}
- context_->Push(data_to_pass.Pass());
+ context_->Push(std::move(data_to_pass));
}
if (needs_notification) {

Powered by Google App Engine
This is Rietveld 408576698