diff options
Diffstat (limited to 'chrome/browser/ssl/ssl_manager.cc')
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index dbff09e..d328d6e 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -59,11 +59,13 @@ void SSLManager::NotifySSLInternalStateChanged() { // static std::string SSLManager::SerializeSecurityInfo(int cert_id, int cert_status, - int security_bits) { + int security_bits, + int ssl_connection_status) { Pickle pickle; pickle.WriteInt(cert_id); pickle.WriteInt(cert_status); pickle.WriteInt(security_bits); + pickle.WriteInt(ssl_connection_status); return std::string(static_cast<const char*>(pickle.data()), pickle.size()); } @@ -71,13 +73,15 @@ std::string SSLManager::SerializeSecurityInfo(int cert_id, bool SSLManager::DeserializeSecurityInfo(const std::string& state, int* cert_id, int* cert_status, - int* security_bits) { + int* security_bits, + int* ssl_connection_status) { DCHECK(cert_id && cert_status && security_bits); if (state.empty()) { // No SSL used. *cert_id = 0; *cert_status = 0; *security_bits = -1; + *ssl_connection_status = 0; return false; } @@ -85,7 +89,8 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state, void * iter = NULL; return pickle.ReadInt(&iter, cert_id) && pickle.ReadInt(&iter, cert_status) && - pickle.ReadInt(&iter, security_bits); + pickle.ReadInt(&iter, security_bits) && + pickle.ReadInt(&iter, ssl_connection_status); } // static @@ -134,11 +139,12 @@ void SSLManager::DidCommitProvisionalLoad( if (details->is_main_frame) { if (entry) { // Decode the security details. - int ssl_cert_id, ssl_cert_status, ssl_security_bits; + int ssl_cert_id, ssl_cert_status, ssl_security_bits, ssl_connection_status; DeserializeSecurityInfo(details->serialized_security_info, &ssl_cert_id, &ssl_cert_status, - &ssl_security_bits); + &ssl_security_bits, + &ssl_connection_status); // We may not have an entry if this is a navigation to an initial blank // page. Reset the SSL information and add the new data we have. @@ -146,6 +152,7 @@ void SSLManager::DidCommitProvisionalLoad( entry->ssl().set_cert_id(ssl_cert_id); entry->ssl().set_cert_status(ssl_cert_status); entry->ssl().set_security_bits(ssl_security_bits); + entry->ssl().set_connection_status(ssl_connection_status); } backend_.ShowPendingMessages(); } |