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

Unified Diff: net/url_request/url_request_ftp_job_unittest.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « net/url_request/url_request_context_storage.cc ('k') | net/url_request/url_request_http_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_ftp_job_unittest.cc
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index ab1a7d9df7d9c51e16fe4a739886ed9df57fe870..cb31ecf5e1b23d05413f4ffdb734ea809695ea1e 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -4,6 +4,7 @@
#include "net/url_request/url_request_ftp_job.h"
+#include <utility>
#include <vector>
#include "base/memory/ref_counted.h"
@@ -46,7 +47,7 @@ class MockProxyResolverFactory : public ProxyResolverFactory {
scoped_ptr<MockAsyncProxyResolver> owned_resolver(
new MockAsyncProxyResolver());
resolver_ = owned_resolver.get();
- *resolver = owned_resolver.Pass();
+ *resolver = std::move(owned_resolver);
return OK;
}
@@ -67,13 +68,13 @@ class FtpTestURLRequestContext : public TestURLRequestContext {
: TestURLRequestContext(true),
ftp_protocol_handler_(new FtpProtocolHandler(ftp_transaction_factory)) {
set_client_socket_factory(socket_factory);
- context_storage_.set_proxy_service(proxy_service.Pass());
+ context_storage_.set_proxy_service(std::move(proxy_service));
set_network_delegate(network_delegate);
scoped_ptr<URLRequestJobFactoryImpl> job_factory =
make_scoped_ptr(new URLRequestJobFactoryImpl);
job_factory->SetProtocolHandler("ftp",
make_scoped_ptr(ftp_protocol_handler_));
- context_storage_.set_job_factory(job_factory.Pass());
+ context_storage_.set_job_factory(std::move(job_factory));
Init();
}
@@ -82,7 +83,7 @@ class FtpTestURLRequestContext : public TestURLRequestContext {
}
void set_proxy_service(scoped_ptr<ProxyService> proxy_service) {
- context_storage_.set_proxy_service(proxy_service.Pass());
+ context_storage_.set_proxy_service(std::move(proxy_service));
}
private:
@@ -321,7 +322,7 @@ TEST_F(URLRequestFtpJobTest, FtpProxyRequestOrphanJob) {
request_context()->set_proxy_service(make_scoped_ptr(new ProxyService(
make_scoped_ptr(new ProxyConfigServiceFixed(
ProxyConfig::CreateFromCustomPacURL(GURL("http://foo")))),
- owned_resolver_factory.Pass(), nullptr)));
+ std::move(owned_resolver_factory), nullptr)));
TestDelegate request_delegate;
scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
@@ -352,7 +353,7 @@ TEST_F(URLRequestFtpJobTest, FtpProxyRequestCancelRequest) {
request_context()->set_proxy_service(make_scoped_ptr(new ProxyService(
make_scoped_ptr(new ProxyConfigServiceFixed(
ProxyConfig::CreateFromCustomPacURL(GURL("http://foo")))),
- owned_resolver_factory.Pass(), nullptr)));
+ std::move(owned_resolver_factory), nullptr)));
TestDelegate request_delegate;
scoped_ptr<URLRequest> url_request(request_context()->CreateRequest(
« no previous file with comments | « net/url_request/url_request_context_storage.cc ('k') | net/url_request/url_request_http_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698