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

Unified Diff: net/socket/ssl_client_socket.cc

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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 | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_server_socket_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket.cc
diff --git a/net/socket/ssl_client_socket.cc b/net/socket/ssl_client_socket.cc
index d48233aac004ee4af4c973924f99680c10b2467c..9f49425ba4448bb520eaa074652d4878a3e842dc 100644
--- a/net/socket/ssl_client_socket.cc
+++ b/net/socket/ssl_client_socket.cc
@@ -15,6 +15,7 @@ SSLClientSocket::SSLClientSocket()
domain_bound_cert_type_(CLIENT_CERT_INVALID_TYPE) {
}
+// static
NextProto SSLClientSocket::NextProtoFromString(
const std::string& proto_string) {
if (proto_string == "http1.1" || proto_string == "http/1.1") {
@@ -32,6 +33,7 @@ NextProto SSLClientSocket::NextProtoFromString(
}
}
+// static
const char* SSLClientSocket::NextProtoToString(NextProto next_proto) {
switch (next_proto) {
case kProtoHTTP11:
@@ -79,6 +81,10 @@ std::string SSLClientSocket::ServerProtosToString(
return JoinString(server_protos_with_commas, ',');
}
+NextProto SSLClientSocket::GetNegotiatedProtocol() const {
+ return protocol_negotiated_;
+}
+
bool SSLClientSocket::IgnoreCertError(int error, int load_flags) {
if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS)
return true;
@@ -114,10 +120,6 @@ bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) {
return was_spdy_negotiated_ = negotiated;
}
-NextProto SSLClientSocket::protocol_negotiated() const {
- return protocol_negotiated_;
-}
-
void SSLClientSocket::set_protocol_negotiated(NextProto protocol_negotiated) {
protocol_negotiated_ = protocol_negotiated;
}
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_server_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698