summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-12-29 18:07:29 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-30 02:08:29 +0000
commit4de264fefd402143d2f4874ae51e601001ff80f6 (patch)
tree34f94e5b86bb339bc6d8c6f2d8fe45ad9a123b79
parentd5ccdf12f8f65b6dcaad74acc86aa76e2ed015d5 (diff)
downloadchromium_src-4de264fefd402143d2f4874ae51e601001ff80f6.zip
chromium_src-4de264fefd402143d2f4874ae51e601001ff80f6.tar.gz
chromium_src-4de264fefd402143d2f4874ae51e601001ff80f6.tar.bz2
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}
-rw-r--r--mojo/edk/embedder/simple_platform_shared_buffer_android.cc4
-rw-r--r--net/android/keystore_openssl.cc4
-rw-r--r--net/socket/ssl_client_socket_openssl_unittest.cc17
-rw-r--r--net/ssl/ssl_platform_key_android.cc7
-rw-r--r--net/test/spawned_test_server/spawner_communicator.cc3
-rw-r--r--third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer_android.cc4
-rw-r--r--ui/events/gestures/blink/web_gesture_curve_impl.cc2
-rw-r--r--ui/snapshot/snapshot_android.cc4
8 files changed, 23 insertions, 22 deletions
diff --git a/mojo/edk/embedder/simple_platform_shared_buffer_android.cc b/mojo/edk/embedder/simple_platform_shared_buffer_android.cc
index 7102434..97ec976 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 <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;
}
diff --git a/net/android/keystore_openssl.cc b/net/android/keystore_openssl.cc
index fb0365c..a4508d6 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 9aa49a0..a1ab91a 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 <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";
diff --git a/net/ssl/ssl_platform_key_android.cc b/net/ssl/ssl_platform_key_android.cc
index 650c4ef..6a6595c 100644
--- a/net/ssl/ssl_platform_key_android.cc
+++ b/net/ssl/ssl_platform_key_android.cc
@@ -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
diff --git a/net/test/spawned_test_server/spawner_communicator.cc b/net/test/spawned_test_server/spawner_communicator.cc
index 9c6470e..8851f9f8 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 <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");
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 34d11c5..8eb8fb1 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 <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;
}
diff --git a/ui/events/gestures/blink/web_gesture_curve_impl.cc b/ui/events/gestures/blink/web_gesture_curve_impl.cc
index 8288e5d..908a544 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<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()));
diff --git a/ui/snapshot/snapshot_android.cc b/ui/snapshot/snapshot_android.cc
index a8200be..0a123b9 100644
--- a/ui/snapshot/snapshot_android.cc
+++ b/ui/snapshot/snapshot_android.cc
@@ -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(