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

Side by Side Diff: components/ssl_config/ssl_config_service_manager_pref.cc

Issue 2083743002: Adding TLS 1.3 constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing default versions. Created 4 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
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 #include "components/ssl_config/ssl_config_service_manager.h" 4 #include "components/ssl_config/ssl_config_service_manager.h"
5 5
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Returns the SSL protocol version (as a uint16_t) represented by a string. 72 // Returns the SSL protocol version (as a uint16_t) represented by a string.
73 // Returns 0 if the string is invalid. 73 // Returns 0 if the string is invalid.
74 uint16_t SSLProtocolVersionFromString(const std::string& version_str) { 74 uint16_t SSLProtocolVersionFromString(const std::string& version_str) {
75 uint16_t version = 0; // Invalid. 75 uint16_t version = 0; // Invalid.
76 if (version_str == switches::kSSLVersionTLSv1) { 76 if (version_str == switches::kSSLVersionTLSv1) {
77 version = net::SSL_PROTOCOL_VERSION_TLS1; 77 version = net::SSL_PROTOCOL_VERSION_TLS1;
78 } else if (version_str == switches::kSSLVersionTLSv11) { 78 } else if (version_str == switches::kSSLVersionTLSv11) {
79 version = net::SSL_PROTOCOL_VERSION_TLS1_1; 79 version = net::SSL_PROTOCOL_VERSION_TLS1_1;
80 } else if (version_str == switches::kSSLVersionTLSv12) { 80 } else if (version_str == switches::kSSLVersionTLSv12) {
81 version = net::SSL_PROTOCOL_VERSION_TLS1_2; 81 version = net::SSL_PROTOCOL_VERSION_TLS1_2;
82 } else if (version_str == switches::kSSLVersionTLSv13) {
83 version = net::SSL_PROTOCOL_VERSION_TLS1_3;
82 } 84 }
83 return version; 85 return version;
84 } 86 }
85 87
86 const base::Feature kDHECiphersFeature{ 88 const base::Feature kDHECiphersFeature{
87 "DHECiphers", base::FEATURE_DISABLED_BY_DEFAULT, 89 "DHECiphers", base::FEATURE_DISABLED_BY_DEFAULT,
88 }; 90 };
89 91
90 } // namespace 92 } // namespace
91 93
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 PrefService* local_state, 310 PrefService* local_state,
309 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { 311 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
310 return new SSLConfigServiceManagerPref(local_state, io_task_runner); 312 return new SSLConfigServiceManagerPref(local_state, io_task_runner);
311 } 313 }
312 314
313 // static 315 // static
314 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { 316 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) {
315 SSLConfigServiceManagerPref::RegisterPrefs(registry); 317 SSLConfigServiceManagerPref::RegisterPrefs(registry);
316 } 318 }
317 } // namespace ssl_config 319 } // namespace ssl_config
OLDNEW
« no previous file with comments | « no previous file | components/ssl_config/ssl_config_switches.h » ('j') | extensions/browser/api/socket/tls_socket.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698