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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 1165283004: Add a new prefer_aes finch options for QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/quic/quic_stream_factory.h ('k') | net/quic/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/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 23d02cd264828ce6eaaaf0aed5449309ddd6dc6e..e1ca61896a438ebdae88081dbf924cad83002457 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -553,6 +553,7 @@ QuicStreamFactory::QuicStreamFactory(
bool enable_connection_racing,
bool enable_non_blocking_io,
bool disable_disk_cache,
+ bool prefer_aes,
int max_number_of_lossy_connections,
float packet_loss_threshold,
int socket_receive_buffer_size,
@@ -578,6 +579,7 @@ QuicStreamFactory::QuicStreamFactory(
enable_connection_racing_(enable_connection_racing),
enable_non_blocking_io_(enable_non_blocking_io),
disable_disk_cache_(disable_disk_cache),
+ prefer_aes_(prefer_aes),
max_number_of_lossy_connections_(max_number_of_lossy_connections),
packet_loss_threshold_(packet_loss_threshold),
socket_receive_buffer_size_(socket_receive_buffer_size),
@@ -602,7 +604,7 @@ QuicStreamFactory::QuicStreamFactory(
bool has_aes_hardware_support = cpu.has_aesni() && cpu.has_avx();
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.PreferAesGcm",
has_aes_hardware_support);
- if (has_aes_hardware_support)
+ if (has_aes_hardware_support || prefer_aes_)
crypto_config_.PreferAesGcm();
if (!IsEcdsaSupported())
crypto_config_.DisableEcdsa();
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698