| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/ssl/ssl_manager.h" | 5 #include "chrome/browser/ssl/ssl_manager.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/load_from_memory_cache_details.h" | 10 #include "chrome/browser/load_from_memory_cache_details.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 ssl_host_state_->AllowCertForHost(cert, host); | 201 ssl_host_state_->AllowCertForHost(cert, host); |
| 202 } | 202 } |
| 203 | 203 |
| 204 // Delegate API method. | 204 // Delegate API method. |
| 205 net::X509Certificate::Policy::Judgment SSLManager::QueryPolicy( | 205 net::X509Certificate::Policy::Judgment SSLManager::QueryPolicy( |
| 206 net::X509Certificate* cert, const std::string& host) { | 206 net::X509Certificate* cert, const std::string& host) { |
| 207 return ssl_host_state_->QueryPolicy(cert, host); | 207 return ssl_host_state_->QueryPolicy(cert, host); |
| 208 } | 208 } |
| 209 | 209 |
| 210 bool SSLManager::CanShowInsecureContent(const GURL& url) { | 210 bool SSLManager::CanShowInsecureContent(const GURL& url) { |
| 211 return ssl_host_state_->CanShowInsecureContent(url); | 211 return ssl_host_state_->DidAllowMixedContentForHost(url.host()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void SSLManager::AllowShowInsecureContentForURL(const GURL& url) { | 214 void SSLManager::AllowShowInsecureContentForURL(const GURL& url) { |
| 215 ssl_host_state_->AllowShowInsecureContentForURL(url); | 215 ssl_host_state_->DidAllowMixedContentForHost(url.host()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool SSLManager::ProcessedSSLErrorFromRequest() const { | 218 bool SSLManager::ProcessedSSLErrorFromRequest() const { |
| 219 NavigationEntry* entry = controller_->GetActiveEntry(); | 219 NavigationEntry* entry = controller_->GetActiveEntry(); |
| 220 if (!entry) { | 220 if (!entry) { |
| 221 NOTREACHED(); | 221 NOTREACHED(); |
| 222 return false; | 222 return false; |
| 223 } | 223 } |
| 224 | 224 |
| 225 return net::IsCertStatusError(entry->ssl().cert_status()); | 225 return net::IsCertStatusError(entry->ssl().cert_status()); |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 } | 735 } |
| 736 | 736 |
| 737 if (ca_name) { | 737 if (ca_name) { |
| 738 // TODO(wtc): should we show the root CA's name instead? | 738 // TODO(wtc): should we show the root CA's name instead? |
| 739 *ca_name = l10n_util::GetStringF( | 739 *ca_name = l10n_util::GetStringF( |
| 740 IDS_SECURE_CONNECTION_EV_CA, | 740 IDS_SECURE_CONNECTION_EV_CA, |
| 741 UTF8ToWide(cert.issuer().organization_names[0])); | 741 UTF8ToWide(cert.issuer().organization_names[0])); |
| 742 } | 742 } |
| 743 return true; | 743 return true; |
| 744 } | 744 } |
| OLD | NEW |