Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: net/http/http_response_info.cc

Issue 7177001: net: serialize SSL connection status to disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a99990b24162db351dd43738e0b7b217e79e68bf 100644
--- a/net/http/http_response_info.cc
+++ b/net/http/http_response_info.cc
@@ -57,6 +57,11 @@ 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 used to fetch the resource as well as the
+ // protocol version, compression method and whether SSLv3 fallback was used.
+ 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 +163,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 +210,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.
+ 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 +247,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())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698