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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2707053006: Allow a preconnecting job to a HTTP2 proxy server based on privacy mode (Closed)
Patch Set: Created 3 years, 10 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_controller.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('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 b9aa8a8132c319e4dd33f17e41c102b9ce15ba56..5a020451f0ab3ee58f2b9c93b700e66fbd1d93f3 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -57,6 +57,7 @@ HttpStreamFactoryImpl::JobController::JobController(
main_job_is_resumed_(false),
bound_job_(nullptr),
can_start_alternative_proxy_job_(false),
+ privacy_mode_(PRIVACY_MODE_DISABLED),
ptr_factory_(this) {
DCHECK(factory);
}
@@ -84,6 +85,8 @@ HttpStreamFactoryImpl::Request* HttpStreamFactoryImpl::JobController::Start(
DCHECK(factory_);
DCHECK(!request_);
+ privacy_mode_ = request_info.privacy_mode;
+
request_ = new Request(request_info.url, this, delegate,
websocket_handshake_stream_create_helper, net_log,
stream_type);
@@ -102,6 +105,8 @@ void HttpStreamFactoryImpl::JobController::Preconnect(
DCHECK(!main_job_);
DCHECK(!alternative_job_);
+ privacy_mode_ = request_info.privacy_mode;
+
is_preconnect_ = true;
HostPortPair destination(HostPortPair::FromURL(request_info.url));
GURL origin_url = ApplyHostMappingRules(request_info.url, &destination);
@@ -184,7 +189,7 @@ void HttpStreamFactoryImpl::JobController::OnStreamReady(
const SSLConfig& used_ssl_config) {
DCHECK(job);
- factory_->OnStreamReady(job->proxy_info());
+ factory_->OnStreamReady(job->proxy_info(), privacy_mode_);
if (IsJobOrphaned(job)) {
// We have bound a job to the associated Request, |job| has been orphaned.
@@ -380,7 +385,7 @@ void HttpStreamFactoryImpl::JobController::OnNeedsProxyAuth(
bool HttpStreamFactoryImpl::JobController::OnInitConnection(
const ProxyInfo& proxy_info) {
- return factory_->OnInitConnection(*this, proxy_info);
+ return factory_->OnInitConnection(*this, proxy_info, privacy_mode_);
}
void HttpStreamFactoryImpl::JobController::OnResolveProxyComplete(
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698