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

Side by Side Diff: net/socket/tcp_client_socket_win.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/socket/tcp_client_socket_win.h ('k') | net/spdy/spdy_proxy_client_socket.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/socket/tcp_client_socket_win.h" 5 #include "net/socket/tcp_client_socket_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory_debug.h" 9 #include "base/memory_debug.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 530
531 void TCPClientSocketWin::SetOmniboxSpeculation() { 531 void TCPClientSocketWin::SetOmniboxSpeculation() {
532 use_history_.set_omnibox_speculation(); 532 use_history_.set_omnibox_speculation();
533 } 533 }
534 534
535 bool TCPClientSocketWin::WasEverUsed() const { 535 bool TCPClientSocketWin::WasEverUsed() const {
536 return use_history_.was_used_to_convey_data(); 536 return use_history_.was_used_to_convey_data();
537 } 537 }
538 538
539 bool TCPClientSocketWin::UsingTCPFastOpen() const {
540 // Not supported on windows.
541 return false;
542 }
543
539 int TCPClientSocketWin::Read(IOBuffer* buf, 544 int TCPClientSocketWin::Read(IOBuffer* buf,
540 int buf_len, 545 int buf_len,
541 CompletionCallback* callback) { 546 CompletionCallback* callback) {
542 DCHECK(CalledOnValidThread()); 547 DCHECK(CalledOnValidThread());
543 DCHECK_NE(socket_, INVALID_SOCKET); 548 DCHECK_NE(socket_, INVALID_SOCKET);
544 DCHECK(!waiting_read_); 549 DCHECK(!waiting_read_);
545 DCHECK(!read_callback_); 550 DCHECK(!read_callback_);
546 DCHECK(!core_->read_iobuffer_); 551 DCHECK(!core_->read_iobuffer_);
547 552
548 buf_len = core_->ThrottleReadSize(buf_len); 553 buf_len = core_->ThrottleReadSize(buf_len);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 use_history_.set_was_used_to_convey_data(); 819 use_history_.set_was_used_to_convey_data();
815 LogByteTransfer(net_log_, NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes, 820 LogByteTransfer(net_log_, NetLog::TYPE_SOCKET_BYTES_SENT, num_bytes,
816 core_->write_buffer_.buf); 821 core_->write_buffer_.buf);
817 } 822 }
818 } 823 }
819 core_->write_iobuffer_ = NULL; 824 core_->write_iobuffer_ = NULL;
820 DoWriteCallback(rv); 825 DoWriteCallback(rv);
821 } 826 }
822 827
823 } // namespace net 828 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_win.h ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698