| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |