| 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 | 4 |
| 5 #include "content/browser/ssl/ssl_manager.h" | 5 #include "content/browser/ssl/ssl_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 NavigationEntryImpl::FromNavigationEntry( | 117 NavigationEntryImpl::FromNavigationEntry( |
| 118 controller_->GetLastCommittedEntry()); | 118 controller_->GetLastCommittedEntry()); |
| 119 | 119 |
| 120 if (details.is_main_frame) { | 120 if (details.is_main_frame) { |
| 121 if (entry) { | 121 if (entry) { |
| 122 // Decode the security details. | 122 // Decode the security details. |
| 123 int ssl_cert_id; | 123 int ssl_cert_id; |
| 124 net::CertStatus ssl_cert_status; | 124 net::CertStatus ssl_cert_status; |
| 125 int ssl_security_bits; | 125 int ssl_security_bits; |
| 126 int ssl_connection_status; | 126 int ssl_connection_status; |
| 127 int ssl_signed_certificate_timestamp_id; |
| 127 DeserializeSecurityInfo(details.serialized_security_info, | 128 DeserializeSecurityInfo(details.serialized_security_info, |
| 128 &ssl_cert_id, | 129 &ssl_cert_id, |
| 129 &ssl_cert_status, | 130 &ssl_cert_status, |
| 130 &ssl_security_bits, | 131 &ssl_security_bits, |
| 131 &ssl_connection_status); | 132 &ssl_connection_status, |
| 133 &ssl_signed_certificate_timestamp_id); |
| 132 | 134 |
| 133 // We may not have an entry if this is a navigation to an initial blank | 135 // We may not have an entry if this is a navigation to an initial blank |
| 134 // page. Reset the SSL information and add the new data we have. | 136 // page. Reset the SSL information and add the new data we have. |
| 135 entry->GetSSL() = SSLStatus(); | 137 entry->GetSSL() = SSLStatus(); |
| 136 entry->GetSSL().cert_id = ssl_cert_id; | 138 entry->GetSSL().cert_id = ssl_cert_id; |
| 137 entry->GetSSL().cert_status = ssl_cert_status; | 139 entry->GetSSL().cert_status = ssl_cert_status; |
| 138 entry->GetSSL().security_bits = ssl_security_bits; | 140 entry->GetSSL().security_bits = ssl_security_bits; |
| 139 entry->GetSSL().connection_status = ssl_connection_status; | 141 entry->GetSSL().connection_status = ssl_connection_status; |
| 142 entry->GetSSL().signed_certificate_timestamp_id = |
| 143 ssl_signed_certificate_timestamp_id; |
| 140 } | 144 } |
| 141 } | 145 } |
| 142 | 146 |
| 143 UpdateEntry(entry); | 147 UpdateEntry(entry); |
| 144 } | 148 } |
| 145 | 149 |
| 146 void SSLManager::DidDisplayInsecureContent() { | 150 void SSLManager::DidDisplayInsecureContent() { |
| 147 UpdateEntry( | 151 UpdateEntry( |
| 148 NavigationEntryImpl::FromNavigationEntry( | 152 NavigationEntryImpl::FromNavigationEntry( |
| 149 controller_->GetLastCommittedEntry())); | 153 controller_->GetLastCommittedEntry())); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 213 |
| 210 WebContentsImpl* contents = | 214 WebContentsImpl* contents = |
| 211 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 215 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
| 212 policy()->UpdateEntry(entry, contents); | 216 policy()->UpdateEntry(entry, contents); |
| 213 | 217 |
| 214 if (!entry->GetSSL().Equals(original_ssl_status)) | 218 if (!entry->GetSSL().Equals(original_ssl_status)) |
| 215 contents->DidChangeVisibleSSLState(); | 219 contents->DidChangeVisibleSSLState(); |
| 216 } | 220 } |
| 217 | 221 |
| 218 } // namespace content | 222 } // namespace content |
| OLD | NEW |