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

Unified Diff: net/spdy/spdy_session.cc

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a2fec98d21edd9a6411975b372c9a9aad7e7fb9c..abf36eff4ef38a28e2b7d746ed1e0ed8194c0c2a 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -30,6 +30,7 @@
#include "crypto/ec_signature_creator.h"
#include "net/base/connection_type_histograms.h"
#include "net/base/net_util.h"
+#include "net/base/trusted_spdy_proxy_provider.h"
#include "net/cert/asn1_util.h"
#include "net/cert/cert_verify_result.h"
#include "net/http/http_log_util.h"
@@ -38,6 +39,7 @@
#include "net/http/http_util.h"
#include "net/http/transport_security_state.h"
#include "net/log/net_log.h"
+#include "net/proxy/proxy_server.h"
#include "net/socket/ssl_client_socket.h"
#include "net/spdy/spdy_buffer_producer.h"
#include "net/spdy/spdy_frame_builder.h"
@@ -640,7 +642,7 @@ SpdySession::SpdySession(
size_t stream_max_recv_window_size,
size_t initial_max_concurrent_streams,
TimeFunc time_func,
- const HostPortPair& trusted_spdy_proxy,
+ const base::WeakPtr<TrustedSpdyProxyProvider>& trusted_spdy_proxy_provider,
NetLog* net_log)
: in_io_loop_(false),
spdy_session_key_(spdy_session_key),
@@ -696,7 +698,6 @@ SpdySession::SpdySession(
connection_at_risk_of_loss_time_(
base::TimeDelta::FromSeconds(kDefaultConnectionAtRiskOfLossSeconds)),
hung_interval_(base::TimeDelta::FromSeconds(kHungIntervalSeconds)),
- trusted_spdy_proxy_(trusted_spdy_proxy),
time_func_(time_func),
send_priority_dependency_(priority_dependency_enabled_default),
weak_factory_(this) {
@@ -712,6 +713,14 @@ SpdySession::SpdySession(
kSpdyDepencenciesFieldTrialEnable) {
send_priority_dependency_ = true;
}
+ if (trusted_spdy_proxy_provider) {
+ net::ProxyServer trusted_spdy_proxy;
+ trusted_spdy_proxy_provider->GetTrustedSpdyProxy(&trusted_spdy_proxy);
+ if (trusted_spdy_proxy.is_valid()) {
+ DCHECK(trusted_spdy_proxy.is_https());
+ trusted_spdy_proxy_ = trusted_spdy_proxy.host_port_pair();
+ }
+ }
// TODO(mbelshe): consider randomization of the stream_hi_water_mark.
}

Powered by Google App Engine
This is Rietveld 408576698