| Index: mojo/services/network/network_service_impl.cc
|
| diff --git a/mojo/services/network/network_service_impl.cc b/mojo/services/network/network_service_impl.cc
|
| index 011afde89cceaa79fe0fd9780b3f8bc554ccbe61..cacaf83ca3a8f7ab35afb23262c999faee82b9df 100644
|
| --- a/mojo/services/network/network_service_impl.cc
|
| +++ b/mojo/services/network/network_service_impl.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "mojo/services/network/network_service_impl.h"
|
|
|
| +#include <utility>
|
| +
|
| #include "mojo/services/network/http_server_impl.h"
|
| #include "mojo/services/network/net_adapters.h"
|
| #include "mojo/services/network/tcp_bound_socket_impl.h"
|
| @@ -16,9 +18,8 @@ namespace mojo {
|
| NetworkServiceImpl::NetworkServiceImpl(
|
| scoped_ptr<mojo::AppRefCount> app_refcount,
|
| InterfaceRequest<NetworkService> request)
|
| - : app_refcount_(app_refcount.Pass()),
|
| - binding_(this, request.Pass()) {
|
| -}
|
| + : app_refcount_(std::move(app_refcount)),
|
| + binding_(this, std::move(request)) {}
|
|
|
| NetworkServiceImpl::~NetworkServiceImpl() {
|
| }
|
| @@ -27,16 +28,16 @@ void NetworkServiceImpl::CreateTCPBoundSocket(
|
| NetAddressPtr local_address,
|
| InterfaceRequest<TCPBoundSocket> bound_socket,
|
| const CreateTCPBoundSocketCallback& callback) {
|
| - scoped_ptr<TCPBoundSocketImpl> bound(new TCPBoundSocketImpl(
|
| - app_refcount_->Clone(), bound_socket.Pass()));
|
| - int net_error = bound->Bind(local_address.Pass());
|
| + scoped_ptr<TCPBoundSocketImpl> bound(
|
| + new TCPBoundSocketImpl(app_refcount_->Clone(), std::move(bound_socket)));
|
| + int net_error = bound->Bind(std::move(local_address));
|
| if (net_error != net::OK) {
|
| callback.Run(MakeNetworkError(net_error), NetAddressPtr());
|
| return;
|
| }
|
| ignore_result(bound.release()); // Strongly owned by the message pipe.
|
| NetAddressPtr resulting_local_address(bound->GetLocalAddress());
|
| - callback.Run(MakeNetworkError(net::OK), resulting_local_address.Pass());
|
| + callback.Run(MakeNetworkError(net::OK), std::move(resulting_local_address));
|
| }
|
|
|
| void NetworkServiceImpl::CreateTCPConnectedSocket(
|
| @@ -53,14 +54,14 @@ void NetworkServiceImpl::CreateTCPConnectedSocket(
|
|
|
| void NetworkServiceImpl::CreateUDPSocket(InterfaceRequest<UDPSocket> request) {
|
| // The lifetime of this UDPSocketImpl is bound to that of the underlying pipe.
|
| - new UDPSocketImpl(request.Pass(), app_refcount_->Clone());
|
| + new UDPSocketImpl(std::move(request), app_refcount_->Clone());
|
| }
|
|
|
| void NetworkServiceImpl::CreateHttpServer(
|
| NetAddressPtr local_address,
|
| HttpServerDelegatePtr delegate,
|
| const CreateHttpServerCallback& callback) {
|
| - HttpServerImpl::Create(local_address.Pass(), delegate.Pass(),
|
| + HttpServerImpl::Create(std::move(local_address), std::move(delegate),
|
| app_refcount_->Clone(), callback);
|
| }
|
|
|
|
|