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

Side by Side Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 10690122: Change SpdySession::GetSSLInfo to get the SSLInfo from the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actual working test Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include <algorithm> // min 7 #include <algorithm> // min
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 int64 SpdyProxyClientSocket::NumBytesRead() const { 163 int64 SpdyProxyClientSocket::NumBytesRead() const {
164 return -1; 164 return -1;
165 } 165 }
166 166
167 base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const { 167 base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const {
168 return base::TimeDelta::FromMicroseconds(-1); 168 return base::TimeDelta::FromMicroseconds(-1);
169 } 169 }
170 170
171 bool SpdyProxyClientSocket::WasNpnNegotiated() const {
172 return false;
173 }
174
171 NextProto SpdyProxyClientSocket::GetNegotiatedProtocol() const { 175 NextProto SpdyProxyClientSocket::GetNegotiatedProtocol() const {
172 return kProtoUnknown; 176 return kProtoUnknown;
173 } 177 }
174 178
179 bool SpdyProxyClientSocket::GetSSLInfo(SSLInfo* ssl_info) const {
180 bool was_npn_negotiated;
181 NextProto protocol_negotiated;
182 return spdy_stream_->GetSSLInfo(ssl_info, &was_npn_negotiated,
183 &protocol_negotiated);
Ryan Sleevi 2012/07/11 22:50:43 nit: alignment
Ryan Hamilton 2012/07/11 23:37:25 Done.
184 }
185
175 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, 186 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
176 const CompletionCallback& callback) { 187 const CompletionCallback& callback) {
177 DCHECK(read_callback_.is_null()); 188 DCHECK(read_callback_.is_null());
178 DCHECK(!user_buffer_); 189 DCHECK(!user_buffer_);
179 190
180 if (next_state_ == STATE_DISCONNECTED) 191 if (next_state_ == STATE_DISCONNECTED)
181 return ERR_SOCKET_NOT_CONNECTED; 192 return ERR_SOCKET_NOT_CONNECTED;
182 193
183 if (next_state_ == STATE_CLOSED && read_buffer_.empty()) { 194 if (next_state_ == STATE_CLOSED && read_buffer_.empty()) {
184 return 0; 195 return 0;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 555 }
545 // This may have been deleted by read_callback_, so check first. 556 // This may have been deleted by read_callback_, so check first.
546 if (weak_ptr && !write_callback.is_null()) 557 if (weak_ptr && !write_callback.is_null())
547 write_callback.Run(ERR_CONNECTION_CLOSED); 558 write_callback.Run(ERR_CONNECTION_CLOSED);
548 } 559 }
549 560
550 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { 561 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) {
551 } 562 }
552 563
553 } // namespace net 564 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698