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

Unified Diff: mojo/services/network/url_loader_impl_apptest.cc

Issue 1539863002: Convert Pass()→std::move() in mojo/services/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing forward declare that was masked by pre-existing incorrect #include ordering. 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 | « mojo/services/network/url_loader_impl.cc ('k') | mojo/services/network/web_socket_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/url_loader_impl_apptest.cc
diff --git a/mojo/services/network/url_loader_impl_apptest.cc b/mojo/services/network/url_loader_impl_apptest.cc
index 0b9de67dad75032b9dc72b94f8f99a86cc9c94a6..d3d68c6c1d7856654ce7290df85e7c483f95df82 100644
--- a/mojo/services/network/url_loader_impl_apptest.cc
+++ b/mojo/services/network/url_loader_impl_apptest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/memory/weak_ptr.h"
@@ -27,7 +29,7 @@ TestURLRequestJob* g_current_job = nullptr;
template <class A>
void PassA(A* destination, A value) {
- *destination = value.Pass();
+ *destination = std::move(value);
}
class TestURLRequestJob : public net::URLRequestJob {
@@ -123,7 +125,7 @@ class UrlLoaderImplTest : public test::ApplicationTestBase {
wait_for_request_.QuitClosure()))));
url_request_context->set_job_factory(&url_request_job_factory_);
url_request_context->Init();
- network_context_.reset(new NetworkContext(url_request_context.Pass()));
+ network_context_.reset(new NetworkContext(std::move(url_request_context)));
MessagePipe pipe;
new URLLoaderImpl(network_context_.get(),
GetProxy(&url_loader_proxy_),
@@ -155,7 +157,7 @@ TEST_F(UrlLoaderImplTest, ClosedWhileWaitingOnTheNetwork) {
request->url = "http://example.com";
URLResponsePtr response;
- url_loader_proxy_->Start(request.Pass(),
+ url_loader_proxy_->Start(std::move(request),
base::Bind(&PassA<URLResponsePtr>, &response));
wait_for_request_.Run();
@@ -186,7 +188,7 @@ TEST_F(UrlLoaderImplTest, ClosedWhileWaitingOnThePipeToBeWriteable) {
request->url = "http://example.com";
URLResponsePtr response;
- url_loader_proxy_->Start(request.Pass(),
+ url_loader_proxy_->Start(std::move(request),
base::Bind(&PassA<URLResponsePtr>, &response));
wait_for_request_.Run();
@@ -227,7 +229,7 @@ TEST_F(UrlLoaderImplTest, RequestCompleted) {
request->url = "http://example.com";
URLResponsePtr response;
- url_loader_proxy_->Start(request.Pass(),
+ url_loader_proxy_->Start(std::move(request),
base::Bind(&PassA<URLResponsePtr>, &response));
wait_for_request_.Run();
@@ -258,7 +260,7 @@ TEST_F(UrlLoaderImplTest, RequestFailed) {
request->url = "http://example.com";
URLResponsePtr response;
- url_loader_proxy_->Start(request.Pass(),
+ url_loader_proxy_->Start(std::move(request),
base::Bind(&PassA<URLResponsePtr>, &response));
wait_for_request_.Run();
« no previous file with comments | « mojo/services/network/url_loader_impl.cc ('k') | mojo/services/network/web_socket_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698