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

Side by Side Diff: net/socket/tcp_socket_win.h

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Fixed a straggling, old enum and applied static_cast<int> to the new netlog enum types, since this … Created 4 years, 3 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
OLDNEW
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 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_ 5 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_
6 #define NET_SOCKET_TCP_SOCKET_WIN_H_ 6 #define NET_SOCKET_TCP_SOCKET_WIN_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <winsock2.h> 9 #include <winsock2.h>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Detachs from the current thread, to allow the socket to be transferred to 93 // Detachs from the current thread, to allow the socket to be transferred to
94 // a new thread. Should only be called when the object is no longer used by 94 // a new thread. Should only be called when the object is no longer used by
95 // the old thread. 95 // the old thread.
96 void DetachFromThread(); 96 void DetachFromThread();
97 97
98 // Marks the start/end of a series of connect attempts for logging purpose. 98 // Marks the start/end of a series of connect attempts for logging purpose.
99 // 99 //
100 // TCPClientSocket may attempt to connect to multiple addresses until it 100 // TCPClientSocket may attempt to connect to multiple addresses until it
101 // succeeds in establishing a connection. The corresponding log will have 101 // succeeds in establishing a connection. The corresponding log will have
102 // multiple NetLog::TYPE_TCP_CONNECT_ATTEMPT entries nested within a 102 // multiple NetLogEventType::TCP_CONNECT_ATTEMPT entries nested within a
103 // NetLog::TYPE_TCP_CONNECT. These methods set the start/end of 103 // NetLogEventType::TCP_CONNECT. These methods set the start/end of
104 // NetLog::TYPE_TCP_CONNECT. 104 // NetLogEventType::TCP_CONNECT.
105 // 105 //
106 // TODO(yzshen): Change logging format and let TCPClientSocket log the 106 // TODO(yzshen): Change logging format and let TCPClientSocket log the
107 // start/end of a series of connect attempts itself. 107 // start/end of a series of connect attempts itself.
108 void StartLoggingMultipleConnectAttempts(const AddressList& addresses); 108 void StartLoggingMultipleConnectAttempts(const AddressList& addresses);
109 void EndLoggingMultipleConnectAttempts(int net_error); 109 void EndLoggingMultipleConnectAttempts(int net_error);
110 110
111 const BoundNetLog& net_log() const { return net_log_; } 111 const BoundNetLog& net_log() const { return net_log_; }
112 112
113 private: 113 private:
114 class Core; 114 class Core;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 bool logging_multiple_connect_attempts_; 165 bool logging_multiple_connect_attempts_;
166 166
167 BoundNetLog net_log_; 167 BoundNetLog net_log_;
168 168
169 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); 169 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin);
170 }; 170 };
171 171
172 } // namespace net 172 } // namespace net
173 173
174 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ 174 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698