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

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 1244413002: Add missing EnsureOpenSSLInit to QuicStreamFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove suppression Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « build/sanitizers/tsan_suppressions.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 29 matching lines...) Expand all
40 #include "net/quic/quic_server_id.h" 40 #include "net/quic/quic_server_id.h"
41 #include "net/socket/client_socket_factory.h" 41 #include "net/socket/client_socket_factory.h"
42 #include "net/udp/udp_client_socket.h" 42 #include "net/udp/udp_client_socket.h"
43 43
44 #if defined(OS_WIN) 44 #if defined(OS_WIN)
45 #include "base/win/windows_version.h" 45 #include "base/win/windows_version.h"
46 #endif 46 #endif
47 47
48 #if defined(USE_OPENSSL) 48 #if defined(USE_OPENSSL)
49 #include <openssl/aead.h> 49 #include <openssl/aead.h>
50 #include "crypto/openssl_util.h"
50 #else 51 #else
51 #include "base/cpu.h" 52 #include "base/cpu.h"
52 #endif 53 #endif
53 54
54 namespace net { 55 namespace net {
55 56
56 namespace { 57 namespace {
57 58
58 enum CreateSessionFailure { 59 enum CreateSessionFailure {
59 CREATION_ERROR_CONNECTING_SOCKET, 60 CREATION_ERROR_CONNECTING_SOCKET,
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 crypto_config_.AddCanonicalSuffix(".googleusercontent.com"); 621 crypto_config_.AddCanonicalSuffix(".googleusercontent.com");
621 crypto_config_.SetProofVerifier( 622 crypto_config_.SetProofVerifier(
622 new ProofVerifierChromium(cert_verifier, transport_security_state)); 623 new ProofVerifierChromium(cert_verifier, transport_security_state));
623 // TODO(rtenneti): http://crbug.com/487355. Temporary fix for b/20760730 until 624 // TODO(rtenneti): http://crbug.com/487355. Temporary fix for b/20760730 until
624 // channel_id_service is supported in cronet. 625 // channel_id_service is supported in cronet.
625 if (channel_id_service) { 626 if (channel_id_service) {
626 crypto_config_.SetChannelIDSource( 627 crypto_config_.SetChannelIDSource(
627 new ChannelIDSourceChromium(channel_id_service)); 628 new ChannelIDSourceChromium(channel_id_service));
628 } 629 }
629 #if defined(USE_OPENSSL) 630 #if defined(USE_OPENSSL)
631 crypto::EnsureOpenSSLInit();
630 bool has_aes_hardware_support = !!EVP_has_aes_hardware(); 632 bool has_aes_hardware_support = !!EVP_has_aes_hardware();
631 #else 633 #else
632 base::CPU cpu; 634 base::CPU cpu;
633 bool has_aes_hardware_support = cpu.has_aesni() && cpu.has_avx(); 635 bool has_aes_hardware_support = cpu.has_aesni() && cpu.has_avx();
634 #endif 636 #endif
635 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.PreferAesGcm", 637 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.PreferAesGcm",
636 has_aes_hardware_support); 638 has_aes_hardware_support);
637 if (has_aes_hardware_support || prefer_aes_) 639 if (has_aes_hardware_support || prefer_aes_)
638 crypto_config_.PreferAesGcm(); 640 crypto_config_.PreferAesGcm();
639 if (!IsEcdsaSupported()) 641 if (!IsEcdsaSupported())
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 // Since the session was active, there's no longer an 1401 // Since the session was active, there's no longer an
1400 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1402 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1401 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1403 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1402 // it as recently broken, which means that 0-RTT will be disabled but we'll 1404 // it as recently broken, which means that 0-RTT will be disabled but we'll
1403 // still race. 1405 // still race.
1404 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1406 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1405 alternative_service); 1407 alternative_service);
1406 } 1408 }
1407 1409
1408 } // namespace net 1410 } // namespace net
OLDNEW
« no previous file with comments | « build/sanitizers/tsan_suppressions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698