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 content::SCTIdStatusList ssl_signed_certificate_timestamp_ids; |
128 DeserializeSecurityInfo(details.serialized_security_info, | 128 DeserializeSecurityInfo(details.serialized_security_info, |
129 &ssl_cert_id, | 129 &ssl_cert_id, |
130 &ssl_cert_status, | 130 &ssl_cert_status, |
131 &ssl_security_bits, | 131 &ssl_security_bits, |
132 &ssl_connection_status, | 132 &ssl_connection_status, |
133 &ssl_signed_certificate_timestamp_id); | 133 &ssl_signed_certificate_timestamp_ids); |
134 | 134 |
135 // 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 |
136 // 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. |
137 entry->GetSSL() = SSLStatus(); | 137 entry->GetSSL() = SSLStatus(); |
138 entry->GetSSL().cert_id = ssl_cert_id; | 138 entry->GetSSL().cert_id = ssl_cert_id; |
139 entry->GetSSL().cert_status = ssl_cert_status; | 139 entry->GetSSL().cert_status = ssl_cert_status; |
140 entry->GetSSL().security_bits = ssl_security_bits; | 140 entry->GetSSL().security_bits = ssl_security_bits; |
141 entry->GetSSL().connection_status = ssl_connection_status; | 141 entry->GetSSL().connection_status = ssl_connection_status; |
142 entry->GetSSL().signed_certificate_timestamp_id = | 142 entry->GetSSL().signed_certificate_timestamp_ids = |
143 ssl_signed_certificate_timestamp_id; | 143 ssl_signed_certificate_timestamp_ids; |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 UpdateEntry(entry); | 147 UpdateEntry(entry); |
148 } | 148 } |
149 | 149 |
150 void SSLManager::DidDisplayInsecureContent() { | 150 void SSLManager::DidDisplayInsecureContent() { |
151 UpdateEntry( | 151 UpdateEntry( |
152 NavigationEntryImpl::FromNavigationEntry( | 152 NavigationEntryImpl::FromNavigationEntry( |
153 controller_->GetLastCommittedEntry())); | 153 controller_->GetLastCommittedEntry())); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 WebContentsImpl* contents = | 214 WebContentsImpl* contents = |
215 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 215 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
216 policy()->UpdateEntry(entry, contents); | 216 policy()->UpdateEntry(entry, contents); |
217 | 217 |
218 if (!entry->GetSSL().Equals(original_ssl_status)) | 218 if (!entry->GetSSL().Equals(original_ssl_status)) |
219 contents->DidChangeVisibleSSLState(); | 219 contents->DidChangeVisibleSSLState(); |
220 } | 220 } |
221 | 221 |
222 } // namespace content | 222 } // namespace content |
OLD | NEW |