Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/ssl_config_service.h" | 5 #include "net/base/ssl_config_service.h" |
| 6 #include "net/base/ssl_config_service_defaults.h" | |
|
wtc
2011/04/05 18:40:37
Nit: please add a blank line after line 5 because
ramant (doing other things)
2011/04/05 21:01:36
Done.
| |
| 6 #include "net/base/ssl_false_start_blacklist.h" | 7 #include "net/base/ssl_false_start_blacklist.h" |
| 7 | 8 |
| 8 #if defined(OS_WIN) | |
| 9 #include "net/base/ssl_config_service_win.h" | |
| 10 #elif defined(OS_MACOSX) | |
| 11 #include "net/base/ssl_config_service_mac.h" | |
| 12 #else | |
| 13 #include "net/base/ssl_config_service_defaults.h" | |
| 14 #endif | |
| 15 | |
| 16 namespace net { | 9 namespace net { |
| 17 | 10 |
| 18 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} | 11 SSLConfig::CertAndStatus::CertAndStatus() : cert_status(0) {} |
| 19 | 12 |
| 20 SSLConfig::CertAndStatus::~CertAndStatus() {} | 13 SSLConfig::CertAndStatus::~CertAndStatus() {} |
| 21 | 14 |
| 22 SSLConfig::SSLConfig() | 15 SSLConfig::SSLConfig() |
| 23 : rev_checking_enabled(true), ssl3_enabled(true), | 16 : rev_checking_enabled(true), ssl3_enabled(true), |
| 24 tls1_enabled(true), dnssec_enabled(false), snap_start_enabled(false), | 17 tls1_enabled(true), dnssec_enabled(false), snap_start_enabled(false), |
| 25 dns_cert_provenance_checking_enabled(false), | 18 dns_cert_provenance_checking_enabled(false), |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 37 } | 30 } |
| 38 return false; | 31 return false; |
| 39 } | 32 } |
| 40 | 33 |
| 41 SSLConfigService::SSLConfigService() | 34 SSLConfigService::SSLConfigService() |
| 42 : observer_list_(ObserverList<Observer>::NOTIFY_EXISTING_ONLY) { | 35 : observer_list_(ObserverList<Observer>::NOTIFY_EXISTING_ONLY) { |
| 43 } | 36 } |
| 44 | 37 |
| 45 // static | 38 // static |
| 46 SSLConfigService* SSLConfigService::CreateSystemSSLConfigService() { | 39 SSLConfigService* SSLConfigService::CreateSystemSSLConfigService() { |
| 47 #if defined(OS_WIN) | |
| 48 return new SSLConfigServiceWin; | |
| 49 #elif defined(OS_MACOSX) | |
| 50 return new SSLConfigServiceMac; | |
| 51 #else | |
| 52 return new SSLConfigServiceDefaults; | 40 return new SSLConfigServiceDefaults; |
|
wtc
2011/04/05 18:40:37
Please add a comment to note that we don't use the
ramant (doing other things)
2011/04/05 21:01:36
Done.
| |
| 53 #endif | |
| 54 } | 41 } |
| 55 | 42 |
| 56 // static | 43 // static |
| 57 bool SSLConfigService::IsKnownStrictTLSServer(const std::string& hostname) { | 44 bool SSLConfigService::IsKnownStrictTLSServer(const std::string& hostname) { |
| 58 // If you wish to add an entry to this list, please contact agl AT chromium | 45 // If you wish to add an entry to this list, please contact agl AT chromium |
| 59 // DOT org. | 46 // DOT org. |
| 60 // | 47 // |
| 61 // If this list starts growing, it'll need to be something more efficient | 48 // If this list starts growing, it'll need to be something more efficient |
| 62 // than a linear list. | 49 // than a linear list. |
| 63 static const char kStrictServers[][22] = { | 50 static const char kStrictServers[][22] = { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, | 156 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, |
| 170 const SSLConfig& new_config) { | 157 const SSLConfig& new_config) { |
| 171 if (orig_config.rev_checking_enabled != new_config.rev_checking_enabled || | 158 if (orig_config.rev_checking_enabled != new_config.rev_checking_enabled || |
| 172 orig_config.ssl3_enabled != new_config.ssl3_enabled || | 159 orig_config.ssl3_enabled != new_config.ssl3_enabled || |
| 173 orig_config.tls1_enabled != new_config.tls1_enabled) { | 160 orig_config.tls1_enabled != new_config.tls1_enabled) { |
| 174 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged()); | 161 FOR_EACH_OBSERVER(Observer, observer_list_, OnSSLConfigChanged()); |
| 175 } | 162 } |
| 176 } | 163 } |
| 177 | 164 |
| 178 } // namespace net | 165 } // namespace net |
| OLD | NEW |