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

Unified Diff: net/tools/quic/test_tools/quic_test_client.h

Issue 2104633002: Landing recent QUIC changes until 6/24/2016 14:00 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.h
diff --git a/net/tools/quic/test_tools/quic_test_client.h b/net/tools/quic/test_tools/quic_test_client.h
index a25a842d5cb1d5d1040149ace721009930feb4ab..b76d1cfce204ded52e609cd540194aecef020b2a 100644
--- a/net/tools/quic/test_tools/quic_test_client.h
+++ b/net/tools/quic/test_tools/quic_test_client.h
@@ -202,6 +202,13 @@ class QuicTestClient : public test::SimpleClient,
size_t num_responses() const { return num_responses_; }
+ // Explicitly set the SNI value for this client, overriding the default
+ // behavior which extracts the SNI value from the request URL.
+ void OverrideSni(const std::string& sni) {
+ override_sni_set_ = true;
+ override_sni_ = sni;
+ }
+
protected:
QuicTestClient();
@@ -274,6 +281,11 @@ class QuicTestClient : public test::SimpleClient,
size_t num_requests_;
size_t num_responses_;
+ // If set, this value is used for the connection SNI, overriding the usual
+ // logic which extracts the SNI from the request URL.
+ bool override_sni_set_ = false;
+ std::string override_sni_;
+
DISALLOW_COPY_AND_ASSIGN(QuicTestClient);
};
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698