OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_socket_win.h" | 5 #include "net/socket/tcp_socket_win.h" |
6 | 6 |
7 #include <mstcpip.h> | 7 #include <mstcpip.h> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 return net_error; | 117 return net_error; |
118 } | 118 } |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 } // namespace | 122 } // namespace |
123 | 123 |
124 //----------------------------------------------------------------------------- | 124 //----------------------------------------------------------------------------- |
125 | 125 |
| 126 // Nothing to do for Windows since it doesn't support TCP FastOpen. |
| 127 void CheckSupportAndMaybeEnableTCPFastOpen(bool user_enabled) {} |
| 128 |
126 // This class encapsulates all the state that has to be preserved as long as | 129 // This class encapsulates all the state that has to be preserved as long as |
127 // there is a network IO operation in progress. If the owner TCPSocketWin is | 130 // there is a network IO operation in progress. If the owner TCPSocketWin is |
128 // destroyed while an operation is in progress, the Core is detached and it | 131 // destroyed while an operation is in progress, the Core is detached and it |
129 // lives until the operation completes and the OS doesn't reference any resource | 132 // lives until the operation completes and the OS doesn't reference any resource |
130 // declared on this class anymore. | 133 // declared on this class anymore. |
131 class TCPSocketWin::Core : public base::RefCounted<Core> { | 134 class TCPSocketWin::Core : public base::RefCounted<Core> { |
132 public: | 135 public: |
133 explicit Core(TCPSocketWin* socket); | 136 explicit Core(TCPSocketWin* socket); |
134 | 137 |
135 // Start watching for the end of a read or write operation. | 138 // Start watching for the end of a read or write operation. |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 | 1017 |
1015 waiting_read_ = false; | 1018 waiting_read_ = false; |
1016 core_->read_iobuffer_ = NULL; | 1019 core_->read_iobuffer_ = NULL; |
1017 core_->read_buffer_length_ = 0; | 1020 core_->read_buffer_length_ = 0; |
1018 | 1021 |
1019 DCHECK_NE(rv, ERR_IO_PENDING); | 1022 DCHECK_NE(rv, ERR_IO_PENDING); |
1020 base::ResetAndReturn(&read_callback_).Run(rv); | 1023 base::ResetAndReturn(&read_callback_).Run(rv); |
1021 } | 1024 } |
1022 | 1025 |
1023 } // namespace net | 1026 } // namespace net |
1024 | |
OLD | NEW |