Hook up NetworkIsolationKey to QuicCryptoClientConfig.
The class has a per-server cache that could be used for fingerprinting.
As it's defined outside of net/, rather than make QuicCryptoClientConfig
NetworkIsolationKey-aware, this CL has QuicStreamFactory create one
QuicCryptoClientConfig per NetworkIsolationKey, as needed. Once there
are no live QuicSessions/QuicStreamFactory::[.*]Jobs using a particular
QuicCryptoClientConfig, the QuicCryptoClientConfig is added to an MRU
cache of recently used configs, and reused/evicted as needed.
This CL also passes in a NetworkIsolationKey to the
HttpServerProperties::*QuicServerInfo calls, to finish hooking up
NetworkIsolationKeys to HttpServerProperties. It's needed in this CL
because the only integration tests for QuicCryptoClientConfig rely
on those methods.
Bug: 1003423, 969890
Change-Id: Id1823012104b84677f6684205bb58fa0227825b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809601
Reviewed-by: Zhongyi Shi <[email protected]>
Commit-Queue: Matt Menke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#698665}
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index d6674f49..4121fb6 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -38,11 +38,13 @@
#include "net/quic/quic_chromium_connection_helper.h"
#include "net/quic/quic_chromium_packet_reader.h"
#include "net/quic/quic_chromium_packet_writer.h"
+#include "net/quic/quic_crypto_client_config_handle.h"
#include "net/quic/quic_http_utils.h"
#include "net/quic/quic_server_info.h"
#include "net/quic/quic_stream_factory.h"
#include "net/quic/quic_test_packet_maker.h"
#include "net/quic/quic_test_packet_printer.h"
+#include "net/quic/test_quic_crypto_client_config_handle.h"
#include "net/quic/test_task_runner.h"
#include "net/socket/socket_performance_watcher.h"
#include "net/socket/socket_test_util.h"
@@ -345,8 +347,9 @@
kQuicYieldAfterDurationMilliseconds),
/*go_away_on_path_degrading*/ false,
client_headers_include_h2_stream_dependency_, /*cert_verify_flags=*/0,
- quic::test::DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN",
- dns_start, dns_end, &push_promise_index_, nullptr,
+ quic::test::DefaultQuicConfig(),
+ std::make_unique<TestQuicCryptoClientConfigHandle>(&crypto_config_),
+ "CONNECTION_UNKNOWN", dns_start, dns_end, &push_promise_index_, nullptr,
base::DefaultTickClock::GetInstance(),
base::ThreadTaskRunnerHandle::Get().get(),
/*socket_performance_watcher=*/nullptr, net_log_.bound().net_log()));