Chromium Code Reviews| Index: net/http/http_response_info.cc |
| diff --git a/net/http/http_response_info.cc b/net/http/http_response_info.cc |
| index c6be3e65a4fc86847db36f9e92b35bb14ece3cdf..5ed72f0c9fca425ed6c2c664b819a87a29a300a8 100644 |
| --- a/net/http/http_response_info.cc |
| +++ b/net/http/http_response_info.cc |
| @@ -93,6 +93,9 @@ enum { |
| RESPONSE_INFO_UNUSED_SINCE_PREFETCH = 1 << 21, |
| + // This bit is set if the response has a key-exchange-info field at the end. |
| + RESPONSE_INFO_HAS_KEY_EXCHANGE_INFO = 1 << 22, |
| + |
| // TODO(darin): Add other bits to indicate alternate request methods. |
| // For now, we don't support storing those. |
| }; |
| @@ -211,6 +214,12 @@ bool HttpResponseInfo::InitFromPickle(const base::Pickle& pickle, |
| return false; |
| ssl_info.security_bits = security_bits; |
| } |
| + if (flags & RESPONSE_INFO_HAS_KEY_EXCHANGE_INFO) { |
| + int key_exchange_info; |
| + if (!iter.ReadInt(&key_exchange_info)) |
| + return false; |
| + ssl_info.key_exchange_info = key_exchange_info; |
| + } |
|
Ryan Sleevi
2015/09/02 01:37:07
BUG: This is a stable serialization format, as unf
sigbjorn
2015/09/02 13:42:14
Moved last, this should hopefully work as the code
|
| if (flags & RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS) { |
| int connection_status; |
| @@ -297,6 +306,8 @@ void HttpResponseInfo::Persist(base::Pickle* pickle, |
| flags |= RESPONSE_INFO_HAS_CERT_STATUS; |
| if (ssl_info.security_bits != -1) |
| flags |= RESPONSE_INFO_HAS_SECURITY_BITS; |
| + if (ssl_info.key_exchange_info != 0) |
| + flags |= RESPONSE_INFO_HAS_KEY_EXCHANGE_INFO; |
| if (ssl_info.connection_status != 0) |
| flags |= RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS; |
| } |
| @@ -344,6 +355,8 @@ void HttpResponseInfo::Persist(base::Pickle* pickle, |
| pickle->WriteUInt32(ssl_info.cert_status); |
| if (ssl_info.security_bits != -1) |
| pickle->WriteInt(ssl_info.security_bits); |
| + if (ssl_info.key_exchange_info != 0) |
| + pickle->WriteInt(ssl_info.key_exchange_info); |
| if (ssl_info.connection_status != 0) |
| pickle->WriteInt(ssl_info.connection_status); |
| if (!ssl_info.signed_certificate_timestamps.empty()) { |