Index: net/http/http_response_info.cc |
diff --git a/net/http/http_response_info.cc b/net/http/http_response_info.cc |
index ed7a902a1513b187d5bec977a7d3648e89d709b2..c8ed28f7d71fdc0cf306aee3d1e4b906957a96ae 100644 |
--- a/net/http/http_response_info.cc |
+++ b/net/http/http_response_info.cc |
@@ -57,6 +57,10 @@ enum { |
// This bit is set if the request was fetched via an explicit proxy. |
RESPONSE_INFO_WAS_PROXY = 1 << 15, |
+ // This bit is set if the response info has an SSL connection status field. |
+ // This contains the ciphersuite of used to fetch the resource. |
wtc
2011/06/16 17:46:35
Nit: remove "of"
Nit: the SSL connection status c
|
+ RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS = 1 << 16, |
+ |
// TODO(darin): Add other bits to indicate alternate request methods. |
// For now, we don't support storing those. |
}; |
@@ -158,6 +162,13 @@ bool HttpResponseInfo::InitFromPickle(const Pickle& pickle, |
ssl_info.security_bits = security_bits; |
} |
+ if (flags & RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS) { |
+ int connection_status; |
+ if (!pickle.ReadInt(&iter, &connection_status)) |
+ return false; |
+ ssl_info.connection_status = connection_status; |
+ } |
+ |
// read vary-data |
if (flags & RESPONSE_INFO_HAS_VARY_DATA) { |
if (!vary_data.InitFromPickle(pickle, &iter)) |
@@ -198,7 +209,8 @@ void HttpResponseInfo::Persist(Pickle* pickle, |
flags |= RESPONSE_INFO_HAS_CERT_STATUS; |
if (ssl_info.security_bits != -1) |
flags |= RESPONSE_INFO_HAS_SECURITY_BITS; |
- // TODO(wtc): we should persist ssl_info.connection_status. |
wtc
2011/06/16 17:46:35
I'm sorry I knew about this bug but it fell throug
|
+ if (ssl_info.connection_status != 0) |
+ flags |= RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS; |
} |
if (vary_data.is_valid()) |
flags |= RESPONSE_INFO_HAS_VARY_DATA; |
@@ -234,6 +246,8 @@ void HttpResponseInfo::Persist(Pickle* pickle, |
pickle->WriteInt(ssl_info.cert_status); |
if (ssl_info.security_bits != -1) |
pickle->WriteInt(ssl_info.security_bits); |
+ if (ssl_info.connection_status != 0) |
+ pickle->WriteInt(ssl_info.connection_status); |
} |
if (vary_data.is_valid()) |