| Index: chrome/browser/profiles/profile_io_data.cc
|
| diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
|
| index 1f88159347e8e4db74ce702511a519c7ca4a3195..5c854107903727ee32bf221053364e4ab5c3be17 100644
|
| --- a/chrome/browser/profiles/profile_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_io_data.cc
|
| @@ -5,8 +5,8 @@
|
| #include "chrome/browser/profiles/profile_io_data.h"
|
|
|
| #include <stddef.h>
|
| -
|
| #include <string>
|
| +#include <utility>
|
|
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| @@ -365,8 +365,8 @@ void InitializeAndPassKeygenHandler(
|
| const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback,
|
| scoped_ptr<ChromeNSSCryptoModuleDelegate> delegate) {
|
| if (delegate)
|
| - keygen_handler->set_crypto_module_delegate(delegate.Pass());
|
| - callback.Run(keygen_handler.Pass());
|
| + keygen_handler->set_crypto_module_delegate(std::move(delegate));
|
| + callback.Run(std::move(keygen_handler));
|
| }
|
| #endif // defined(USE_NSS_CERTS)
|
|
|
| @@ -559,7 +559,7 @@ ProfileIOData::MediaRequestContext::MediaRequestContext() {
|
|
|
| void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory(
|
| scoped_ptr<net::HttpTransactionFactory> http_factory) {
|
| - http_factory_ = http_factory.Pass();
|
| + http_factory_ = std::move(http_factory);
|
| set_http_transaction_factory(http_factory_.get());
|
| }
|
|
|
| @@ -578,13 +578,13 @@ void ProfileIOData::AppRequestContext::SetCookieStore(
|
|
|
| void ProfileIOData::AppRequestContext::SetHttpTransactionFactory(
|
| scoped_ptr<net::HttpTransactionFactory> http_factory) {
|
| - http_factory_ = http_factory.Pass();
|
| + http_factory_ = std::move(http_factory);
|
| set_http_transaction_factory(http_factory_.get());
|
| }
|
|
|
| void ProfileIOData::AppRequestContext::SetJobFactory(
|
| scoped_ptr<net::URLRequestJobFactory> job_factory) {
|
| - job_factory_ = job_factory.Pass();
|
| + job_factory_ = std::move(job_factory);
|
| set_job_factory(job_factory_.get());
|
| }
|
|
|
| @@ -802,12 +802,10 @@ net::URLRequestContext* ProfileIOData::GetIsolatedAppRequestContext(
|
| if (ContainsKey(app_request_context_map_, partition_descriptor)) {
|
| context = app_request_context_map_[partition_descriptor];
|
| } else {
|
| - context =
|
| - AcquireIsolatedAppRequestContext(main_context,
|
| - partition_descriptor,
|
| - protocol_handler_interceptor.Pass(),
|
| - protocol_handlers,
|
| - request_interceptors.Pass());
|
| + context = AcquireIsolatedAppRequestContext(
|
| + main_context, partition_descriptor,
|
| + std::move(protocol_handler_interceptor), protocol_handlers,
|
| + std::move(request_interceptors));
|
| app_request_context_map_[partition_descriptor] = context;
|
| }
|
| DCHECK(context);
|
| @@ -902,7 +900,7 @@ bool ProfileIOData::IsDataReductionProxyEnabled() const {
|
| void ProfileIOData::set_data_reduction_proxy_io_data(
|
| scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
|
| data_reduction_proxy_io_data) const {
|
| - data_reduction_proxy_io_data_ = data_reduction_proxy_io_data.Pass();
|
| + data_reduction_proxy_io_data_ = std::move(data_reduction_proxy_io_data);
|
| }
|
|
|
| base::WeakPtr<net::HttpServerProperties>
|
| @@ -912,7 +910,7 @@ ProfileIOData::http_server_properties() const {
|
|
|
| void ProfileIOData::set_http_server_properties(
|
| scoped_ptr<net::HttpServerProperties> http_server_properties) const {
|
| - http_server_properties_ = http_server_properties.Pass();
|
| + http_server_properties_ = std::move(http_server_properties);
|
| }
|
|
|
| ProfileIOData::ResourceContext::ResourceContext(ProfileIOData* io_data)
|
| @@ -1056,7 +1054,7 @@ void ProfileIOData::Init(
|
| io_thread->net_log(),
|
| io_thread_globals->proxy_script_fetcher_context.get(),
|
| io_thread_globals->system_network_delegate.get(),
|
| - profile_params_->proxy_config_service.Pass(), command_line,
|
| + std::move(profile_params_->proxy_config_service), command_line,
|
| quick_check_enabled_.GetValue());
|
| transport_security_state_.reset(new net::TransportSecurityState());
|
| base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
|
| @@ -1136,11 +1134,10 @@ void ProfileIOData::Init(
|
| new net::MultiLogCTVerifier());
|
| ct_verifier->AddLogs(io_thread_globals->ct_logs);
|
| main_request_context_->set_cert_transparency_verifier(ct_verifier.get());
|
| - cert_transparency_verifier_ = ct_verifier.Pass();
|
| + cert_transparency_verifier_ = std::move(ct_verifier);
|
|
|
| - InitializeInternal(
|
| - network_delegate.Pass(), profile_params_.get(),
|
| - protocol_handlers, request_interceptors.Pass());
|
| + InitializeInternal(std::move(network_delegate), profile_params_.get(),
|
| + protocol_handlers, std::move(request_interceptors));
|
|
|
| profile_params_.reset();
|
| initialized_ = true;
|
| @@ -1220,21 +1217,22 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
|
| #endif
|
|
|
| // Set up interceptors in the reverse order.
|
| - scoped_ptr<net::URLRequestJobFactory> top_job_factory = job_factory.Pass();
|
| + scoped_ptr<net::URLRequestJobFactory> top_job_factory =
|
| + std::move(job_factory);
|
| for (content::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();
|
|
|
| if (protocol_handler_interceptor) {
|
| - protocol_handler_interceptor->Chain(top_job_factory.Pass());
|
| - return protocol_handler_interceptor.Pass();
|
| + protocol_handler_interceptor->Chain(std::move(top_job_factory));
|
| + return std::move(protocol_handler_interceptor);
|
| } else {
|
| - return top_job_factory.Pass();
|
| + return top_job_factory;
|
| }
|
| }
|
|
|
| @@ -1314,7 +1312,7 @@ scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
|
| return make_scoped_ptr(new net::HttpCache(
|
| make_scoped_ptr(new DevToolsNetworkTransactionFactory(
|
| network_controller_handle_.GetController(), session)),
|
| - main_backend.Pass(), true /* set_up_quic_server_info */));
|
| + std::move(main_backend), true /* set_up_quic_server_info */));
|
| }
|
|
|
| scoped_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory(
|
| @@ -1323,7 +1321,7 @@ scoped_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory(
|
| return make_scoped_ptr(new net::HttpCache(
|
| make_scoped_ptr(new DevToolsNetworkTransactionFactory(
|
| network_controller_handle_.GetController(), shared_session)),
|
| - backend.Pass(), true /* set_up_quic_server_info */));
|
| + std::move(backend), true /* set_up_quic_server_info */));
|
| }
|
|
|
| void ProfileIOData::SetCookieSettingsForTesting(
|
|
|