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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2895443002: Return Job as unique_ptr from factory methods. (Closed)
Patch Set: Created 3 years, 7 months 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 | « net/http/http_stream_factory_impl_job.cc ('k') | net/http/http_stream_factory_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job_controller.cc
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index 6dfbfa6555f5655f50a2a05225b77529cf977c2d..7c54efecf5e41a33f262473514c6f6e67f8e09b0 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -774,17 +774,17 @@ int HttpStreamFactoryImpl::JobController::DoCreateJobs() {
// priority currently makes sense for preconnects. The priority for
// preconnects is currently ignored (see RequestSocketsForPool()), but could
// be used at some point for proxy resolution or something.
- main_job_.reset(job_factory_->CreateAltSvcJob(
+ main_job_ = job_factory_->CreateAltSvcJob(
this, PRECONNECT, session_, request_info_, IDLE, proxy_info_,
server_ssl_config_, proxy_ssl_config_, destination, origin_url,
- alternative_service, enable_ip_based_pooling_, session_->net_log()));
+ alternative_service, enable_ip_based_pooling_, session_->net_log());
main_job_->Preconnect(num_streams_);
return OK;
}
- main_job_.reset(job_factory_->CreateMainJob(
+ main_job_ = job_factory_->CreateMainJob(
this, MAIN, session_, request_info_, priority_, proxy_info_,
server_ssl_config_, proxy_ssl_config_, destination, origin_url,
- enable_ip_based_pooling_, net_log_.net_log()));
+ enable_ip_based_pooling_, net_log_.net_log());
// Alternative Service can only be set for HTTPS requests while Alternative
// Proxy is set for HTTP requests.
if (alternative_service.protocol != kProtoUnknown) {
@@ -798,11 +798,11 @@ int HttpStreamFactoryImpl::JobController::DoCreateJobs() {
ignore_result(
ApplyHostMappingRules(request_info_.url, &alternative_destination));
- alternative_job_.reset(job_factory_->CreateAltSvcJob(
+ alternative_job_ = job_factory_->CreateAltSvcJob(
this, ALTERNATIVE, session_, request_info_, priority_, proxy_info_,
server_ssl_config_, proxy_ssl_config_, alternative_destination,
origin_url, alternative_service, enable_ip_based_pooling_,
- net_log_.net_log()));
+ net_log_.net_log());
main_job_is_blocked_ = true;
alternative_job_->Start(request_->stream_type());
@@ -814,11 +814,11 @@ int HttpStreamFactoryImpl::JobController::DoCreateJobs() {
ProxyInfo alternative_proxy_info;
alternative_proxy_info.UseProxyServer(alternative_proxy_server);
- alternative_job_.reset(job_factory_->CreateAltProxyJob(
+ alternative_job_ = job_factory_->CreateAltProxyJob(
this, ALTERNATIVE, session_, request_info_, priority_,
alternative_proxy_info, server_ssl_config_, proxy_ssl_config_,
destination, origin_url, alternative_proxy_server,
- enable_ip_based_pooling_, net_log_.net_log()));
+ enable_ip_based_pooling_, net_log_.net_log());
can_start_alternative_proxy_job_ = false;
main_job_is_blocked_ = true;
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/http/http_stream_factory_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698