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

Unified Diff: content/shell/browser/shell_url_request_context_getter.cc

Issue 1544293002: Convert Pass()→std::move() in //content (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 | « content/shell/browser/shell_net_log.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_url_request_context_getter.cc
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index ed9712d4e4cfe22427cdbabb2c3a23db89dd4ba0..08d19e684c6a70d77b7c1c0f310c9f9f8e5e4ff3 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -4,6 +4,8 @@
#include "content/shell/browser/shell_url_request_context_getter.h"
+#include <utility>
+
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -75,7 +77,7 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter(
io_loop_(io_loop),
file_loop_(file_loop),
net_log_(net_log),
- request_interceptors_(request_interceptors.Pass()) {
+ request_interceptors_(std::move(request_interceptors)) {
// Must first be created on the UI thread.
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -104,7 +106,7 @@ ShellURLRequestContextGetter::GetProxyConfigService() {
scoped_ptr<net::ProxyService> ShellURLRequestContextGetter::GetProxyService() {
// TODO(jam): use v8 if possible, look at chrome code.
return net::ProxyService::CreateUsingSystemProxyResolver(
- proxy_config_service_.Pass(), 0, url_request_context_->net_log());
+ std::move(proxy_config_service_), 0, url_request_context_->net_log());
}
net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
@@ -191,23 +193,22 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
}
if (command_line.HasSwitch(switches::kHostResolverRules)) {
scoped_ptr<net::MappedHostResolver> mapped_host_resolver(
- new net::MappedHostResolver(host_resolver.Pass()));
+ new net::MappedHostResolver(std::move(host_resolver)));
mapped_host_resolver->SetRulesFromString(
command_line.GetSwitchValueASCII(switches::kHostResolverRules));
- host_resolver = mapped_host_resolver.Pass();
+ host_resolver = std::move(mapped_host_resolver);
}
// Give |storage_| ownership at the end in case it's |mapped_host_resolver|.
- storage_->set_host_resolver(host_resolver.Pass());
+ storage_->set_host_resolver(std::move(host_resolver));
network_session_params.host_resolver =
url_request_context_->host_resolver();
storage_->set_http_network_session(
make_scoped_ptr(new net::HttpNetworkSession(network_session_params)));
- storage_->set_http_transaction_factory(make_scoped_ptr(
- new net::HttpCache(storage_->http_network_session(),
- main_backend.Pass(),
- true /* set_up_quic_server_info */)));
+ storage_->set_http_transaction_factory(make_scoped_ptr(new net::HttpCache(
+ storage_->http_network_session(), std::move(main_backend),
+ true /* set_up_quic_server_info */)));
scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl());
@@ -228,17 +229,17 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
// Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory =
- job_factory.Pass();
+ std::move(job_factory);
for (URLRequestInterceptorScopedVector::reverse_iterator i =
request_interceptors_.rbegin();
i != request_interceptors_.rend();
++i) {
top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
- top_job_factory.Pass(), make_scoped_ptr(*i)));
+ std::move(top_job_factory), make_scoped_ptr(*i)));
}
request_interceptors_.weak_clear();
- storage_->set_job_factory(top_job_factory.Pass());
+ storage_->set_job_factory(std::move(top_job_factory));
}
return url_request_context_.get();
« no previous file with comments | « content/shell/browser/shell_net_log.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698