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

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

Issue 4039003: Add experimental option for TCP FastOpen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | remoting/jingle_glue/ssl_socket_adapter.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 void SpdyProxyClientSocket::SetOmniboxSpeculation() { 115 void SpdyProxyClientSocket::SetOmniboxSpeculation() {
116 // TODO(rch): what should this implementation be? 116 // TODO(rch): what should this implementation be?
117 } 117 }
118 118
119 bool SpdyProxyClientSocket::WasEverUsed() const { 119 bool SpdyProxyClientSocket::WasEverUsed() const {
120 return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed()); 120 return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed());
121 } 121 }
122 122
123 bool SpdyProxyClientSocket::UsingTCPFastOpen() const {
124 return false;
125 }
126
123 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, 127 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len,
124 CompletionCallback* callback) { 128 CompletionCallback* callback) {
125 DCHECK(!read_callback_); 129 DCHECK(!read_callback_);
126 DCHECK(!user_buffer_); 130 DCHECK(!user_buffer_);
127 131
128 if (next_state_ == STATE_DISCONNECTED) 132 if (next_state_ == STATE_DISCONNECTED)
129 return ERR_SOCKET_NOT_CONNECTED; 133 return ERR_SOCKET_NOT_CONNECTED;
130 134
131 if (!spdy_stream_ && read_buffer_.empty()) { 135 if (!spdy_stream_ && read_buffer_.empty()) {
132 if (eof_has_been_read_) 136 if (eof_has_been_read_)
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 read_callback->Run(status); 460 read_callback->Run(status);
457 } else if (read_callback_) { 461 } else if (read_callback_) {
458 // If we have a read_callback, the we need to make sure we call it back 462 // If we have a read_callback, the we need to make sure we call it back
459 OnDataReceived(NULL, 0); 463 OnDataReceived(NULL, 0);
460 } 464 }
461 if (write_callback) 465 if (write_callback)
462 write_callback->Run(ERR_CONNECTION_CLOSED); 466 write_callback->Run(ERR_CONNECTION_CLOSED);
463 } 467 }
464 468
465 } // namespace net 469 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | remoting/jingle_glue/ssl_socket_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698