summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 16:16:26 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 16:16:26 +0000
commit33661e48840aaf44b3efe090b3e947ef83f67a0a (patch)
tree68f71046efc5e025e92ec7df6139c0738d47822d /net/spdy
parent10abb583615dd307782034fabadcc0555c12fcd7 (diff)
downloadchromium_src-33661e48840aaf44b3efe090b3e947ef83f67a0a.zip
chromium_src-33661e48840aaf44b3efe090b3e947ef83f67a0a.tar.gz
chromium_src-33661e48840aaf44b3efe090b3e947ef83f67a0a.tar.bz2
Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses.
BUG=120890 Review URL: https://chromiumcodereview.appspot.com/9958028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_proxy_client_socket.cc4
-rw-r--r--net/spdy/spdy_proxy_client_socket.h1
-rw-r--r--net/spdy/spdy_session.cc8
3 files changed, 9 insertions, 4 deletions
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index 182be87..c0ba9d1 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -169,6 +169,10 @@ base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const {
return base::TimeDelta::FromMicroseconds(-1);
}
+NextProto SpdyProxyClientSocket::GetNegotiatedProtocol() const {
+ return kProtoUnknown;
+}
+
int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
const CompletionCallback& callback) {
DCHECK(read_callback_.is_null());
diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h
index 45d5937..fe0ca77 100644
--- a/net/spdy/spdy_proxy_client_socket.h
+++ b/net/spdy/spdy_proxy_client_socket.h
@@ -75,6 +75,7 @@ class NET_EXPORT_PRIVATE SpdyProxyClientSocket : public ProxyClientSocket,
virtual bool UsingTCPFastOpen() const OVERRIDE;
virtual int64 NumBytesRead() const OVERRIDE;
virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
+ virtual NextProto GetNegotiatedProtocol() const OVERRIDE;
// Socket implementation.
virtual int Read(IOBuffer* buf,
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 3815357..203f328 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -438,7 +438,7 @@ net::Error SpdySession::InitializeWithSocket(
NextProto protocol = g_default_protocol;
if (is_secure_) {
SSLClientSocket* ssl_socket = GetSSLClientSocket();
- NextProto protocol_negotiated = ssl_socket->protocol_negotiated();
+ NextProto protocol_negotiated = ssl_socket->GetNegotiatedProtocol();
if (protocol_negotiated != kProtoUnknown) {
protocol = protocol_negotiated;
}
@@ -633,7 +633,7 @@ bool SpdySession::NeedsCredentials() const {
if (!is_secure_)
return false;
SSLClientSocket* ssl_socket = GetSSLClientSocket();
- if (ssl_socket->protocol_negotiated() < kProtoSPDY3)
+ if (ssl_socket->GetNegotiatedProtocol() < kProtoSPDY3)
return false;
return ssl_socket->WasDomainBoundCertSent();
}
@@ -1187,7 +1187,7 @@ Value* SpdySession::GetInfoAsValue() const {
NextProto proto = kProtoUnknown;
if (is_secure_) {
- proto = GetSSLClientSocket()->protocol_negotiated();
+ proto = GetSSLClientSocket()->GetNegotiatedProtocol();
}
dict->SetString("protocol_negotiated",
SSLClientSocket::NextProtoToString(proto));
@@ -1307,7 +1307,7 @@ bool SpdySession::GetSSLInfo(SSLInfo* ssl_info,
SSLClientSocket* ssl_socket = GetSSLClientSocket();
ssl_socket->GetSSLInfo(ssl_info);
*was_npn_negotiated = ssl_socket->was_npn_negotiated();
- *protocol_negotiated = ssl_socket->protocol_negotiated();
+ *protocol_negotiated = ssl_socket->GetNegotiatedProtocol();
return true;
}