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

Unified Diff: net/proxy/mojo_proxy_resolver_impl.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
Index: net/proxy/mojo_proxy_resolver_impl.cc
diff --git a/net/proxy/mojo_proxy_resolver_impl.cc b/net/proxy/mojo_proxy_resolver_impl.cc
index e8c400bb163235da59d00729748e1bfcffb768bd..bbac2e72ccaa8dadedb54df1f3d33461d428c718 100644
--- a/net/proxy/mojo_proxy_resolver_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_impl.cc
@@ -4,6 +4,8 @@
#include "net/proxy/mojo_proxy_resolver_impl.h"
+#include <utility>
+
#include "base/macros.h"
#include "base/stl_util.h"
#include "mojo/common/url_type_converters.h"
@@ -46,8 +48,7 @@ class MojoProxyResolverImpl::Job {
MojoProxyResolverImpl::MojoProxyResolverImpl(
scoped_ptr<ProxyResolverV8Tracing> resolver)
- : resolver_(resolver.Pass()) {
-}
+ : resolver_(std::move(resolver)) {}
MojoProxyResolverImpl::~MojoProxyResolverImpl() {
STLDeleteElements(&resolve_jobs_);
@@ -57,7 +58,7 @@ void MojoProxyResolverImpl::GetProxyForUrl(
const mojo::String& url,
interfaces::ProxyResolverRequestClientPtr client) {
DVLOG(1) << "GetProxyForUrl(" << url << ")";
- Job* job = new Job(client.Pass(), this, url.To<GURL>());
+ Job* job = new Job(std::move(client), this, url.To<GURL>());
bool inserted = resolve_jobs_.insert(job).second;
DCHECK(inserted);
job->Start();
@@ -74,7 +75,7 @@ MojoProxyResolverImpl::Job::Job(
MojoProxyResolverImpl* resolver,
const GURL& url)
: resolver_(resolver),
- client_(client.Pass()),
+ client_(std::move(client)),
url_(url),
request_handle_(nullptr),
done_(false) {}
@@ -106,7 +107,7 @@ void MojoProxyResolverImpl::Job::GetProxyDone(int error) {
result = mojo::Array<interfaces::ProxyServerPtr>::From(
result_.proxy_list().GetAll());
}
- client_->ReportResult(error, result.Pass());
+ client_->ReportResult(error, std::move(result));
resolver_->DeleteJob(this);
}
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | net/proxy/mojo_proxy_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698