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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 2109303002: Add QuicStreamFactory as an observer of an SSLConfigService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index c011f6a9d5e6d1af82acbfd5bdb85ada4da14778..832cf909eb8a9ff21ccacd572ab8e25feb7eac82 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -596,6 +596,7 @@ QuicStreamRequest::CreateBidirectionalStreamImpl() {
QuicStreamFactory::QuicStreamFactory(
NetLog* net_log,
HostResolver* host_resolver,
+ SSLConfigService* ssl_config_service,
ClientSocketFactory* client_socket_factory,
HttpServerProperties* http_server_properties,
CertVerifier* cert_verifier,
@@ -690,7 +691,10 @@ QuicStreamFactory::QuicStreamFactory(
num_push_streams_created_(0),
status_(OPEN),
task_runner_(nullptr),
+ ssl_config_service_(ssl_config_service),
weak_factory_(this) {
+ if (ssl_config_service_.get())
+ ssl_config_service_->AddObserver(this);
if (disable_quic_on_timeout_with_open_streams)
threshold_timeouts_with_open_streams_ = 1;
DCHECK(transport_security_state_);
@@ -748,6 +752,8 @@ QuicStreamFactory::~QuicStreamFactory() {
STLDeleteElements(&(active_jobs_[server_id]));
active_jobs_.erase(server_id);
}
+ if (ssl_config_service_.get())
+ ssl_config_service_->RemoveObserver(this);
Ryan Hamilton 2016/06/29 23:16:15 It'd sure be cool if we has some sort of ScopedObs
if (migrate_sessions_on_network_change_) {
NetworkChangeNotifier::RemoveNetworkObserver(this);
} else if (close_sessions_on_ip_change_) {

Powered by Google App Engine
This is Rietveld 408576698