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

Unified Diff: net/proxy/proxy_resolver_v8_tracing_wrapper.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/proxy_resolver_v8_tracing_wrapper.cc
diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper.cc b/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
index fa0629806b2f7f2ac52e0ce06aed8b73ac338a33..25144b6181317a0d2d4ccef805b5bcb051b5172d 100644
--- a/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_wrapper.cc
@@ -5,6 +5,7 @@
#include "net/proxy/proxy_resolver_v8_tracing_wrapper.h"
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/macros.h"
@@ -24,7 +25,7 @@ scoped_ptr<base::Value> NetLogErrorCallback(
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("line_number", line_number);
dict->SetString("message", *message);
- return dict.Pass();
+ return std::move(dict);
}
class BindingsImpl : public ProxyResolverV8Tracing::Bindings {
@@ -108,11 +109,10 @@ ProxyResolverV8TracingWrapper::ProxyResolverV8TracingWrapper(
NetLog* net_log,
HostResolver* host_resolver,
scoped_ptr<ProxyResolverErrorObserver> error_observer)
- : resolver_impl_(resolver_impl.Pass()),
+ : resolver_impl_(std::move(resolver_impl)),
net_log_(net_log),
host_resolver_(host_resolver),
- error_observer_(error_observer.Pass()) {
-}
+ error_observer_(std::move(error_observer)) {}
int ProxyResolverV8TracingWrapper::GetProxyForURL(
const GURL& url,
@@ -186,7 +186,8 @@ void ProxyResolverFactoryV8TracingWrapper::OnProxyResolverCreated(
int error) {
if (error == OK) {
resolver->reset(new ProxyResolverV8TracingWrapper(
- v8_resolver->Pass(), net_log_, host_resolver_, error_observer.Pass()));
+ std::move(*v8_resolver), net_log_, host_resolver_,
+ std::move(error_observer)));
}
callback.Run(error);
}
« no previous file with comments | « net/proxy/proxy_resolver_v8_tracing_unittest.cc ('k') | net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698