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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 2600943002: Cleanup the preconnect to proxy code and Job controller code (Closed)
Patch Set: rch comments Created 4 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 | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.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.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index c090016e1057bbe63bcf5f16b57321ca80fa8cea..577a990853ae6ac0e4d83987152c46b7873ee019 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
-#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
@@ -89,23 +88,13 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
}
};
-// Returns true if only one preconnect to proxy servers is allowed via field
-// trial.
-bool AllowOnlyOnePreconnectToProxyServers() {
- return base::StartsWith(base::FieldTrialList::FindFullName(
- "NetAllowOnlyOnePreconnectToProxyServers"),
- "Enabled", base::CompareCase::INSENSITIVE_ASCII);
-}
-
} // anonymous namespace
HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session,
bool for_websockets)
: session_(session),
job_factory_(new DefaultJobFactory()),
- for_websockets_(for_websockets),
- allow_only_one_preconnect_to_proxy_servers_(
- AllowOnlyOnePreconnectToProxyServers()) {}
+ for_websockets_(for_websockets) {}
HttpStreamFactoryImpl::~HttpStreamFactoryImpl() {
DCHECK(request_map_.empty());
@@ -261,7 +250,7 @@ bool HttpStreamFactoryImpl::OnInitConnection(const JobController& controller,
return false;
}
- if (!allow_only_one_preconnect_to_proxy_servers_ ||
+ if (!session_->params().restrict_to_one_preconnect_for_proxies ||
!ProxyServerSupportsPriorities(proxy_info)) {
return false;
}
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698