diff --git a/mojo/edk/embedder/simple_platform_shared_buffer_android.cc b/mojo/edk/embedder/simple_platform_shared_buffer_android.cc index 710243479ddbd5..97ec976012d552 100644 --- a/mojo/edk/embedder/simple_platform_shared_buffer_android.cc +++ b/mojo/edk/embedder/simple_platform_shared_buffer_android.cc @@ -8,8 +8,8 @@ #include #include // For |PROT_...|. #include // For |off_t|. - #include +#include #include "base/files/scoped_file.h" #include "base/logging.h" @@ -65,7 +65,7 @@ bool SimplePlatformSharedBuffer::InitFromPlatformHandle( return false; } - handle_ = platform_handle.Pass(); + handle_ = std::move(platform_handle); return true; } diff --git a/net/android/keystore_openssl.cc b/net/android/keystore_openssl.cc index fb0365c6a8d53f..a4508d618a6861 100644 --- a/net/android/keystore_openssl.cc +++ b/net/android/keystore_openssl.cc @@ -351,7 +351,7 @@ crypto::ScopedEVP_PKEY CreateRsaPkeyWrapper( !EVP_PKEY_set1_RSA(pkey.get(), rsa.get())) { return crypto::ScopedEVP_PKEY(); } - return pkey.Pass(); + return pkey; } // On Android < 4.2, the libkeystore.so ENGINE uses CRYPTO_EX_DATA and is not @@ -526,7 +526,7 @@ crypto::ScopedEVP_PKEY GetEcdsaPkeyWrapper(jobject private_key) { !EVP_PKEY_set1_EC_KEY(pkey.get(), ec_key.get())) { return crypto::ScopedEVP_PKEY(); } - return pkey.Pass(); + return pkey; } const ECDSA_METHOD android_ecdsa_method = { diff --git a/net/socket/ssl_client_socket_openssl_unittest.cc b/net/socket/ssl_client_socket_openssl_unittest.cc index 9aa49a08e26b14..a1ab91a4754750 100644 --- a/net/socket/ssl_client_socket_openssl_unittest.cc +++ b/net/socket/ssl_client_socket_openssl_unittest.cc @@ -5,13 +5,13 @@ #include "net/socket/ssl_client_socket.h" #include -#include - #include #include #include #include #include +#include +#include #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -99,11 +99,9 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest { const HostPortPair& host_and_port, const SSLConfig& ssl_config) { scoped_ptr connection(new ClientSocketHandle); - connection->SetSocket(transport_socket.Pass()); - return socket_factory_->CreateSSLClientSocket(connection.Pass(), - host_and_port, - ssl_config, - context_); + connection->SetSocket(std::move(transport_socket)); + return socket_factory_->CreateSSLClientSocket( + std::move(connection), host_and_port, ssl_config, context_); } // Connect to a HTTPS test server. @@ -153,9 +151,8 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest { // itself was a success. bool CreateAndConnectSSLClientSocket(const SSLConfig& ssl_config, int* result) { - sock_ = CreateSSLClientSocket(transport_.Pass(), - test_server_->host_port_pair(), - ssl_config); + sock_ = CreateSSLClientSocket(std::move(transport_), + test_server_->host_port_pair(), ssl_config); if (sock_->IsConnected()) { LOG(ERROR) << "SSL Socket prematurely connected"; diff --git a/net/ssl/ssl_platform_key_android.cc b/net/ssl/ssl_platform_key_android.cc index 650c4ef484a410..6a6595cc0e651e 100644 --- a/net/ssl/ssl_platform_key_android.cc +++ b/net/ssl/ssl_platform_key_android.cc @@ -6,6 +6,7 @@ #include #include +#include #include "base/logging.h" #include "base/macros.h" @@ -23,7 +24,7 @@ namespace { class SSLPlatformKeyAndroid : public ThreadedSSLPrivateKey::Delegate { public: SSLPlatformKeyAndroid(crypto::ScopedEVP_PKEY key, SSLPrivateKey::Type type) - : key_(key.Pass()), type_(type) {} + : key_(std::move(key)), type_(type) {} ~SSLPlatformKeyAndroid() override {} @@ -119,7 +120,7 @@ scoped_refptr WrapOpenSSLPrivateKey(crypto::ScopedEVP_PKEY key) { return nullptr; } return make_scoped_refptr(new ThreadedSSLPrivateKey( - make_scoped_ptr(new SSLPlatformKeyAndroid(key.Pass(), type)), + make_scoped_ptr(new SSLPlatformKeyAndroid(std::move(key), type)), GetSSLPlatformKeyTaskRunner())); } @@ -130,7 +131,7 @@ scoped_refptr FetchClientCertPrivateKey( crypto::ScopedEVP_PKEY key = OpenSSLClientKeyStore::GetInstance()->FetchClientCertPrivateKey( certificate); - return WrapOpenSSLPrivateKey(key.Pass()); + return WrapOpenSSLPrivateKey(std::move(key)); } } // namespace net diff --git a/net/test/spawned_test_server/spawner_communicator.cc b/net/test/spawned_test_server/spawner_communicator.cc index 9c6470ecb38136..8851f9f8bec075 100644 --- a/net/test/spawned_test_server/spawner_communicator.cc +++ b/net/test/spawned_test_server/spawner_communicator.cc @@ -5,6 +5,7 @@ #include "net/test/spawned_test_server/spawner_communicator.h" #include +#include #include "base/json/json_reader.h" #include "base/logging.h" @@ -192,7 +193,7 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread( scoped_ptr reader( UploadOwnedBytesElementReader::CreateWithString(post_data)); cur_request_->set_upload( - ElementsUploadDataStream::CreateWithReader(reader.Pass(), 0)); + ElementsUploadDataStream::CreateWithReader(std::move(reader), 0)); HttpRequestHeaders headers; headers.SetHeader(HttpRequestHeaders::kContentType, "application/json"); diff --git a/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer_android.cc b/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer_android.cc index 34d11c5287df24..8eb8fb1ce0c71b 100644 --- a/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer_android.cc +++ b/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer_android.cc @@ -7,8 +7,8 @@ #include #include // For |PROT_...|. #include // For |off_t|. - #include +#include #include "base/files/scoped_file.h" #include "base/logging.h" @@ -64,7 +64,7 @@ bool SimplePlatformSharedBuffer::InitFromPlatformHandle( return false; } - handle_ = platform_handle.Pass(); + handle_ = std::move(platform_handle); return true; } diff --git a/ui/events/gestures/blink/web_gesture_curve_impl.cc b/ui/events/gestures/blink/web_gesture_curve_impl.cc index 8288e5de7b4c00..908a544d67526f 100644 --- a/ui/events/gestures/blink/web_gesture_curve_impl.cc +++ b/ui/events/gestures/blink/web_gesture_curve_impl.cc @@ -40,7 +40,7 @@ scoped_ptr CreateDefaultPlatformCurve( INT_MIN, INT_MAX, base::TimeTicks()); - return scroller.Pass(); + return std::move(scroller); #else return make_scoped_ptr( new FlingCurve(initial_velocity, base::TimeTicks())); diff --git a/ui/snapshot/snapshot_android.cc b/ui/snapshot/snapshot_android.cc index a8200be708df7f..0a123b9f2dcf8e 100644 --- a/ui/snapshot/snapshot_android.cc +++ b/ui/snapshot/snapshot_android.cc @@ -4,6 +4,8 @@ #include "ui/snapshot/snapshot.h" +#include + #include "base/bind.h" #include "cc/output/copy_output_request.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -53,7 +55,7 @@ static void MakeAsyncCopyRequest( source_rect_in_pixel.size()); request->set_area(adjusted_source_rect); - window->GetCompositor()->RequestCopyOfOutputOnRootLayer(request.Pass()); + window->GetCompositor()->RequestCopyOfOutputOnRootLayer(std::move(request)); } void GrabWindowSnapshotAndScaleAsync(