Chromium Code Reviews| 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 content::SignedCertificateTimestampIDStatusList | |
|
jam
2013/11/27 01:07:50
ditto (i won't mention it anymore)
alcutter
2013/11/27 12:17:56
Done (and elsewhere).
| |
| 128 ssl_signed_certificate_timestamp_ids; | |
| 127 DeserializeSecurityInfo(details.serialized_security_info, | 129 DeserializeSecurityInfo(details.serialized_security_info, |
| 128 &ssl_cert_id, | 130 &ssl_cert_id, |
| 129 &ssl_cert_status, | 131 &ssl_cert_status, |
| 130 &ssl_security_bits, | 132 &ssl_security_bits, |
| 131 &ssl_connection_status); | 133 &ssl_connection_status, |
| 134 &ssl_signed_certificate_timestamp_ids); | |
| 132 | 135 |
| 133 // We may not have an entry if this is a navigation to an initial blank | 136 // 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. | 137 // page. Reset the SSL information and add the new data we have. |
| 135 entry->GetSSL() = SSLStatus(); | 138 entry->GetSSL() = SSLStatus(); |
| 136 entry->GetSSL().cert_id = ssl_cert_id; | 139 entry->GetSSL().cert_id = ssl_cert_id; |
| 137 entry->GetSSL().cert_status = ssl_cert_status; | 140 entry->GetSSL().cert_status = ssl_cert_status; |
| 138 entry->GetSSL().security_bits = ssl_security_bits; | 141 entry->GetSSL().security_bits = ssl_security_bits; |
| 139 entry->GetSSL().connection_status = ssl_connection_status; | 142 entry->GetSSL().connection_status = ssl_connection_status; |
| 143 entry->GetSSL().signed_certificate_timestamp_ids = | |
| 144 ssl_signed_certificate_timestamp_ids; | |
| 140 } | 145 } |
| 141 } | 146 } |
| 142 | 147 |
| 143 UpdateEntry(entry); | 148 UpdateEntry(entry); |
| 144 } | 149 } |
| 145 | 150 |
| 146 void SSLManager::DidDisplayInsecureContent() { | 151 void SSLManager::DidDisplayInsecureContent() { |
| 147 UpdateEntry( | 152 UpdateEntry( |
| 148 NavigationEntryImpl::FromNavigationEntry( | 153 NavigationEntryImpl::FromNavigationEntry( |
| 149 controller_->GetLastCommittedEntry())); | 154 controller_->GetLastCommittedEntry())); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 | 214 |
| 210 WebContentsImpl* contents = | 215 WebContentsImpl* contents = |
| 211 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 216 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
| 212 policy()->UpdateEntry(entry, contents); | 217 policy()->UpdateEntry(entry, contents); |
| 213 | 218 |
| 214 if (!entry->GetSSL().Equals(original_ssl_status)) | 219 if (!entry->GetSSL().Equals(original_ssl_status)) |
| 215 contents->DidChangeVisibleSSLState(); | 220 contents->DidChangeVisibleSSLState(); |
| 216 } | 221 } |
| 217 | 222 |
| 218 } // namespace content | 223 } // namespace content |
| OLD | NEW |