| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 new_config)); | 275 new_config)); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( | 278 void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( |
| 279 net::SSLConfig* config) { | 279 net::SSLConfig* config) { |
| 280 config->rev_checking_enabled = rev_checking_enabled_.GetValue(); | 280 config->rev_checking_enabled = rev_checking_enabled_.GetValue(); |
| 281 config->rev_checking_required_local_anchors = | 281 config->rev_checking_required_local_anchors = |
| 282 rev_checking_required_local_anchors_.GetValue(); | 282 rev_checking_required_local_anchors_.GetValue(); |
| 283 std::string version_min_str = ssl_version_min_.GetValue(); | 283 std::string version_min_str = ssl_version_min_.GetValue(); |
| 284 std::string version_max_str = ssl_version_max_.GetValue(); | 284 std::string version_max_str = ssl_version_max_.GetValue(); |
| 285 config->version_min = net::SSLConfigService::default_version_min(); | |
| 286 config->version_max = net::SSLConfigService::default_version_max(); | |
| 287 uint16 version_min = SSLProtocolVersionFromString(version_min_str); | 285 uint16 version_min = SSLProtocolVersionFromString(version_min_str); |
| 288 uint16 version_max = SSLProtocolVersionFromString(version_max_str); | 286 uint16 version_max = SSLProtocolVersionFromString(version_max_str); |
| 289 if (version_min) { | 287 if (version_min) { |
| 290 // TODO(wtc): get the minimum SSL protocol version supported by the | 288 // TODO(wtc): get the minimum SSL protocol version supported by the |
| 291 // SSLClientSocket class. Right now it happens to be the same as the | 289 // SSLClientSocket class. Right now it happens to be the same as the |
| 292 // default minimum SSL protocol version because we enable all supported | 290 // default minimum SSL protocol version because we enable all supported |
| 293 // versions by default. | 291 // versions by default. |
| 294 uint16 supported_version_min = config->version_min; | 292 uint16 supported_version_min = config->version_min; |
| 295 config->version_min = std::max(supported_version_min, version_min); | 293 config->version_min = std::max(supported_version_min, version_min); |
| 296 } | 294 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 321 // static | 319 // static |
| 322 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( | 320 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager( |
| 323 PrefService* local_state) { | 321 PrefService* local_state) { |
| 324 return new SSLConfigServiceManagerPref(local_state); | 322 return new SSLConfigServiceManagerPref(local_state); |
| 325 } | 323 } |
| 326 | 324 |
| 327 // static | 325 // static |
| 328 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { | 326 void SSLConfigServiceManager::RegisterPrefs(PrefRegistrySimple* registry) { |
| 329 SSLConfigServiceManagerPref::RegisterPrefs(registry); | 327 SSLConfigServiceManagerPref::RegisterPrefs(registry); |
| 330 } | 328 } |
| OLD | NEW |