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

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

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Return fake ConnectionAttempt in MockTCPClientSocket Created 5 years, 7 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | remoting/protocol/channel_multiplexer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return kProtoUnknown; 183 return kProtoUnknown;
184 } 184 }
185 185
186 bool SpdyProxyClientSocket::GetSSLInfo(SSLInfo* ssl_info) { 186 bool SpdyProxyClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
187 bool was_npn_negotiated; 187 bool was_npn_negotiated;
188 NextProto protocol_negotiated; 188 NextProto protocol_negotiated;
189 return spdy_stream_->GetSSLInfo(ssl_info, &was_npn_negotiated, 189 return spdy_stream_->GetSSLInfo(ssl_info, &was_npn_negotiated,
190 &protocol_negotiated); 190 &protocol_negotiated);
191 } 191 }
192 192
193 void SpdyProxyClientSocket::GetConnectionAttempts(
194 ConnectionAttempts* out) const {
195 out->clear();
196 }
197
193 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, 198 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
194 const CompletionCallback& callback) { 199 const CompletionCallback& callback) {
195 DCHECK(read_callback_.is_null()); 200 DCHECK(read_callback_.is_null());
196 DCHECK(!user_buffer_.get()); 201 DCHECK(!user_buffer_.get());
197 202
198 if (next_state_ == STATE_DISCONNECTED) 203 if (next_state_ == STATE_DISCONNECTED)
199 return ERR_SOCKET_NOT_CONNECTED; 204 return ERR_SOCKET_NOT_CONNECTED;
200 205
201 if (next_state_ == STATE_CLOSED && read_buffer_queue_.IsEmpty()) { 206 if (next_state_ == STATE_CLOSED && read_buffer_queue_.IsEmpty()) {
202 return 0; 207 return 0;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } else if (!read_callback_.is_null()) { 521 } else if (!read_callback_.is_null()) {
517 // If we have a read_callback_, the we need to make sure we call it back. 522 // If we have a read_callback_, the we need to make sure we call it back.
518 OnDataReceived(scoped_ptr<SpdyBuffer>()); 523 OnDataReceived(scoped_ptr<SpdyBuffer>());
519 } 524 }
520 // This may have been deleted by read_callback_, so check first. 525 // This may have been deleted by read_callback_, so check first.
521 if (weak_ptr.get() && !write_callback.is_null()) 526 if (weak_ptr.get() && !write_callback.is_null())
522 write_callback.Run(ERR_CONNECTION_CLOSED); 527 write_callback.Run(ERR_CONNECTION_CLOSED);
523 } 528 }
524 529
525 } // namespace net 530 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | remoting/protocol/channel_multiplexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698