Chromium Code Reviews| Index: net/http/http_cache.cc |
| diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc |
| index ccded67606f609db8bce433b09614b4766c130fb..2b236ea30dea3ca47191d916b633509e410d4cac 100644 |
| --- a/net/http/http_cache.cc |
| +++ b/net/http/http_cache.cc |
| @@ -35,6 +35,7 @@ |
| #include "net/base/upload_data_stream.h" |
| #include "net/disk_cache/disk_cache.h" |
| #include "net/http/disk_cache_based_quic_server_info.h" |
| +#include "net/http/http_cache_lookup_manager.h" |
| #include "net/http/http_cache_transaction.h" |
| #include "net/http/http_network_layer.h" |
| #include "net/http/http_network_session.h" |
| @@ -320,8 +321,13 @@ HttpCache::HttpCache(std::unique_ptr<HttpTransactionFactory> network_layer, |
| // rather than having logic only used in unit tests here. |
| if (session) { |
|
Ryan Hamilton
2017/02/16 15:15:07
nit: as long as you're here:
if (!session)
retu
Zhongyi Shi
2017/02/19 20:19:53
Done.
|
| net_log_ = session->net_log(); |
| - if (is_main_cache && |
| - !session->quic_stream_factory()->has_quic_server_info_factory()) { |
| + if (!is_main_cache) |
| + return; |
| + |
| + session->SetServerPushDelegate( |
| + base::MakeUnique<HttpCacheLookupManager>(this)); |
| + |
| + if (!session->quic_stream_factory()->has_quic_server_info_factory()) { |
| // QuicStreamFactory takes ownership of QuicServerInfoFactoryAdaptor. |
| session->quic_stream_factory()->set_quic_server_info_factory( |
| new QuicServerInfoFactoryAdaptor(this)); |