OLD | NEW |
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 "chrome/browser/net/ssl_config_service_manager.h" | 4 #include "chrome/browser/net/ssl_config_service_manager.h" |
5 | 5 |
6 #include <algorithm> | 6 #include <algorithm> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 new_config)); | 268 new_config)); |
269 } | 269 } |
270 | 270 |
271 void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( | 271 void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( |
272 net::SSLConfig* config) { | 272 net::SSLConfig* config) { |
273 config->rev_checking_enabled = rev_checking_enabled_.GetValue(); | 273 config->rev_checking_enabled = rev_checking_enabled_.GetValue(); |
274 config->rev_checking_required_local_anchors = | 274 config->rev_checking_required_local_anchors = |
275 rev_checking_required_local_anchors_.GetValue(); | 275 rev_checking_required_local_anchors_.GetValue(); |
276 std::string version_min_str = ssl_version_min_.GetValue(); | 276 std::string version_min_str = ssl_version_min_.GetValue(); |
277 std::string version_max_str = ssl_version_max_.GetValue(); | 277 std::string version_max_str = ssl_version_max_.GetValue(); |
278 config->version_min = net::SSLConfigService::default_version_min(); | 278 config->version_min = net::kDefaultSSLVersionMin; |
279 config->version_max = net::SSLConfigService::default_version_max(); | 279 config->version_max = net::kDefaultSSLVersionMax; |
280 uint16 version_min = SSLProtocolVersionFromString(version_min_str); | 280 uint16 version_min = SSLProtocolVersionFromString(version_min_str); |
281 uint16 version_max = SSLProtocolVersionFromString(version_max_str); | 281 uint16 version_max = SSLProtocolVersionFromString(version_max_str); |
282 if (version_min) { | 282 if (version_min) { |
283 // TODO(wtc): get the minimum SSL protocol version supported by the | 283 // TODO(wtc): get the minimum SSL protocol version supported by the |
284 // SSLClientSocket class. Right now it happens to be the same as the | 284 // SSLClientSocket class. Right now it happens to be the same as the |
285 // default minimum SSL protocol version because we enable all supported | 285 // default minimum SSL protocol version because we enable all supported |
286 // versions by default. | 286 // versions by default. |
287 uint16 supported_version_min = config->version_min; | 287 uint16 supported_version_min = config->version_min; |
288 config->version_min = std::max(supported_version_min, version_min); | 288 config->version_min = std::max(supported_version_min, version_min); |
289 } | 289 } |
(...skipping 22 matching lines...) Expand all Loading... |
312 // static | 312 // static |
313 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( | 313 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( |
314 PrefService* local_state) { | 314 PrefService* local_state) { |
315 return new SSLConfigServiceManagerPref(local_state); | 315 return new SSLConfigServiceManagerPref(local_state); |
316 } | 316 } |
317 | 317 |
318 // static | 318 // static |
319 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { | 319 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { |
320 SSLConfigServiceManagerPref::RegisterPrefs(registry); | 320 SSLConfigServiceManagerPref::RegisterPrefs(registry); |
321 } | 321 } |
OLD | NEW |