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

Unified Diff: remoting/client/plugin/pepper_port_allocator.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
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
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_video_renderer_2d.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_port_allocator.cc
diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc
index 0b24341cabdf605843f903a300b2845f4c5dcb65..0b28e5a91841b939c6ee40ce09c094e61a64f321 100644
--- a/remoting/client/plugin/pepper_port_allocator.cc
+++ b/remoting/client/plugin/pepper_port_allocator.cc
@@ -6,6 +6,8 @@
#include <stdint.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
@@ -209,13 +211,9 @@ void PepperPortAllocatorSession::OnResponseBodyRead(int32_t result) {
// static
scoped_ptr<PepperPortAllocator> PepperPortAllocator::Create(
const pp::InstanceHandle& instance) {
- scoped_ptr<rtc::NetworkManager> network_manager(
- new PepperNetworkManager(instance));
- scoped_ptr<rtc::PacketSocketFactory> socket_factory(
- new PepperPacketSocketFactory(instance));
- scoped_ptr<PepperPortAllocator> result(new PepperPortAllocator(
- instance, network_manager.Pass(), socket_factory.Pass()));
- return result.Pass();
+ return make_scoped_ptr(new PepperPortAllocator(
+ instance, make_scoped_ptr(new PepperNetworkManager(instance)),
+ make_scoped_ptr(new PepperPacketSocketFactory(instance))));
}
PepperPortAllocator::PepperPortAllocator(
@@ -226,9 +224,8 @@ PepperPortAllocator::PepperPortAllocator(
socket_factory.get(),
std::string()),
instance_(instance),
- network_manager_(network_manager.Pass()),
- socket_factory_(socket_factory.Pass()) {
-}
+ network_manager_(std::move(network_manager)),
+ socket_factory_(std::move(socket_factory)) {}
PepperPortAllocator::~PepperPortAllocator() {}
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_video_renderer_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698