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

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..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())
« 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