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

Unified Diff: net/http/http_response_info.cc

Issue 1313363003: Expose OpenSSL's key_exchange_info in the content API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Proper #ifdef fix Created 5 years, 3 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 | « content/public/common/ssl_status.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | 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 18e7235ea1ac79242cbe0a662e4f848cce4c6357..fa9d63cccb401acc2c2153a61b6102f4627585ce 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.
};
@@ -273,6 +276,14 @@ bool HttpResponseInfo::InitFromPickle(const base::Pickle& pickle,
}
}
+ // Read key_exchange_info
+ 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;
+ }
+
was_fetched_via_spdy = (flags & RESPONSE_INFO_WAS_SPDY) != 0;
was_npn_negotiated = (flags & RESPONSE_INFO_WAS_NPN) != 0;
@@ -297,6 +308,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;
}
@@ -368,6 +381,9 @@ void HttpResponseInfo::Persist(base::Pickle* pickle,
if (connection_info != CONNECTION_INFO_UNKNOWN)
pickle->WriteInt(static_cast<int>(connection_info));
+
+ if (ssl_info.is_valid() && ssl_info.key_exchange_info != 0)
+ pickle->WriteInt(ssl_info.key_exchange_info);
}
HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto(
« no previous file with comments | « content/public/common/ssl_status.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698