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

Unified Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2283393002: Use a field trial to decide if QUIC should attempt to prevent packet fragmentation. (Closed)
Patch Set: Rebase Created 4 years, 4 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/quic/chromium/quic_stream_factory.h ('k') | net/quic/chromium/quic_stream_factory_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_stream_factory.cc
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index 37a59dd64d54f95d1b8012f486053076412589b5..e2f9b0f660855b8fb64a4122216d35f0f177045e 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -743,6 +743,7 @@ QuicStreamFactory::QuicStreamFactory(
bool allow_server_migration,
bool force_hol_blocking,
bool race_cert_verification,
+ bool quic_do_not_fragment,
const QuicTagVector& connection_options,
bool enable_token_binding)
: require_confirmation_(true),
@@ -800,6 +801,7 @@ QuicStreamFactory::QuicStreamFactory(
allow_server_migration_(allow_server_migration),
force_hol_blocking_(force_hol_blocking),
race_cert_verification_(race_cert_verification),
+ quic_do_not_fragment_(quic_do_not_fragment),
port_seed_(random_generator_->RandUint64()),
check_persisted_supports_quic_(true),
has_initialized_data_(false),
@@ -1705,11 +1707,13 @@ int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket,
return rv;
}
- rv = socket->SetDoNotFragment();
- // SetDoNotFragment is not implemented on all platforms, so ignore errors.
- if (rv != OK && rv != ERR_NOT_IMPLEMENTED) {
- HistogramCreateSessionFailure(CREATION_ERROR_SETTING_DO_NOT_FRAGMENT);
- return rv;
+ if (quic_do_not_fragment_) {
+ rv = socket->SetDoNotFragment();
+ // SetDoNotFragment is not implemented on all platforms, so ignore errors.
+ if (rv != OK && rv != ERR_NOT_IMPLEMENTED) {
+ HistogramCreateSessionFailure(CREATION_ERROR_SETTING_DO_NOT_FRAGMENT);
+ return rv;
+ }
}
// Set a buffer large enough to contain the initial CWND's worth of packet
« no previous file with comments | « net/quic/chromium/quic_stream_factory.h ('k') | net/quic/chromium/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698