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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing header ordering. Created 4 years, 8 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
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 8db6c694858eb8f90b9d379bb7e6a4932c62d61b..aacf8a4267a8458c491e0d065a356cc57a6f61c9 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -8,6 +8,8 @@
#include <set>
#include <utility>
+#include <openssl/aead.h>
+
#include "base/location.h"
#include "base/macros.h"
#include "base/metrics/field_trial.h"
@@ -21,6 +23,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
+#include "crypto/openssl_util.h"
#include "net/base/ip_address.h"
#include "net/base/net_errors.h"
#include "net/base/socket_performance_watcher.h"
@@ -57,13 +60,6 @@
#include "base/win/windows_version.h"
#endif
-#if defined(USE_OPENSSL)
-#include <openssl/aead.h>
-#include "crypto/openssl_util.h"
-#else
-#include "base/cpu.h"
-#endif
-
using std::min;
using std::vector;
using NetworkHandle = net::NetworkChangeNotifier::NetworkHandle;
@@ -680,13 +676,8 @@ QuicStreamFactory::QuicStreamFactory(
}
if (enable_token_binding && channel_id_service && IsTokenBindingSupported())
crypto_config_.tb_key_params.push_back(kP256);
-#if defined(USE_OPENSSL)
crypto::EnsureOpenSSLInit();
bool has_aes_hardware_support = !!EVP_has_aes_hardware();
-#else
- base::CPU cpu;
- bool has_aes_hardware_support = cpu.has_aesni() && cpu.has_avx();
davidben 2016/04/18 19:36:45 As follow-up: we can probably prune some stuff fro
svaldez 2016/04/18 20:21:40 Acknowledged.
-#endif
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.PreferAesGcm",
has_aes_hardware_support);
if (has_aes_hardware_support || prefer_aes_)

Powered by Google App Engine
This is Rietveld 408576698