Commit 4de264fe authored by dcheng's avatar dcheng Committed by Commit bot

Global conversion of Pass()→std::move() on OS=android

(╯^□^)╯︵ 

BUG=557422
R=avi@chromium.org
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1557553002

Cr-Commit-Position: refs/heads/master@{#367133}
parent d5ccdf12
......@@ -8,8 +8,8 @@
#include <stdint.h>
#include <sys/mman.h> // For |PROT_...|.
#include <sys/types.h> // For |off_t|.
#include <limits>
#include <utility>
#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;
}
......
......@@ -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 = {
......
......@@ -5,13 +5,13 @@
#include "net/socket/ssl_client_socket.h"
#include <errno.h>
#include <string.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <string.h>
#include <utility>
#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<ClientSocketHandle> 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";
......
......@@ -6,6 +6,7 @@
#include <openssl/digest.h>
#include <openssl/evp.h>
#include <utility>
#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<SSLPrivateKey> 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<SSLPrivateKey> FetchClientCertPrivateKey(
crypto::ScopedEVP_PKEY key =
OpenSSLClientKeyStore::GetInstance()->FetchClientCertPrivateKey(
certificate);
return WrapOpenSSLPrivateKey(key.Pass());
return WrapOpenSSLPrivateKey(std::move(key));
}
} // namespace net
......@@ -5,6 +5,7 @@
#include "net/test/spawned_test_server/spawner_communicator.h"
#include <limits>
#include <utility>
#include "base/json/json_reader.h"
#include "base/logging.h"
......@@ -192,7 +193,7 @@ void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
scoped_ptr<UploadElementReader> 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");
......
......@@ -7,8 +7,8 @@
#include <stdint.h>
#include <sys/mman.h> // For |PROT_...|.
#include <sys/types.h> // For |off_t|.
#include <limits>
#include <utility>
#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;
}
......
......@@ -40,7 +40,7 @@ scoped_ptr<GestureCurve> 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()));
......
......@@ -4,6 +4,8 @@
#include "ui/snapshot/snapshot.h"
#include <utility>
#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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment