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

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

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Ran "git cl format" on code. Much formatting ensued. 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
« no previous file with comments | « net/socket/ssl_server_socket_impl.cc ('k') | net/socket/tcp_socket_posix.cc » ('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 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_POSIX_H_ 5 #ifndef NET_SOCKET_TCP_SOCKET_POSIX_H_
6 #define NET_SOCKET_TCP_SOCKET_POSIX_H_ 6 #define NET_SOCKET_TCP_SOCKET_POSIX_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Detachs from the current thread, to allow the socket to be transferred to 91 // Detachs from the current thread, to allow the socket to be transferred to
92 // a new thread. Should only be called when the object is no longer used by 92 // a new thread. Should only be called when the object is no longer used by
93 // the old thread. 93 // the old thread.
94 void DetachFromThread(); 94 void DetachFromThread();
95 95
96 // Marks the start/end of a series of connect attempts for logging purpose. 96 // Marks the start/end of a series of connect attempts for logging purpose.
97 // 97 //
98 // TCPClientSocket may attempt to connect to multiple addresses until it 98 // TCPClientSocket may attempt to connect to multiple addresses until it
99 // succeeds in establishing a connection. The corresponding log will have 99 // succeeds in establishing a connection. The corresponding log will have
100 // multiple NetLog::TYPE_TCP_CONNECT_ATTEMPT entries nested within a 100 // multiple NetLogEventType::TCP_CONNECT_ATTEMPT entries nested within a
101 // NetLog::TYPE_TCP_CONNECT. These methods set the start/end of 101 // NetLogEventType::TCP_CONNECT. These methods set the start/end of
102 // NetLog::TYPE_TCP_CONNECT. 102 // NetLogEventType::TCP_CONNECT.
103 // 103 //
104 // TODO(yzshen): Change logging format and let TCPClientSocket log the 104 // TODO(yzshen): Change logging format and let TCPClientSocket log the
105 // start/end of a series of connect attempts itself. 105 // start/end of a series of connect attempts itself.
106 void StartLoggingMultipleConnectAttempts(const AddressList& addresses); 106 void StartLoggingMultipleConnectAttempts(const AddressList& addresses);
107 void EndLoggingMultipleConnectAttempts(int net_error); 107 void EndLoggingMultipleConnectAttempts(int net_error);
108 108
109 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); 109 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
110 110
111 const BoundNetLog& net_log() const { return net_log_; } 111 const BoundNetLog& net_log() const { return net_log_; }
112 112
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 bool logging_multiple_connect_attempts_; 247 bool logging_multiple_connect_attempts_;
248 248
249 BoundNetLog net_log_; 249 BoundNetLog net_log_;
250 250
251 DISALLOW_COPY_AND_ASSIGN(TCPSocketPosix); 251 DISALLOW_COPY_AND_ASSIGN(TCPSocketPosix);
252 }; 252 };
253 253
254 } // namespace net 254 } // namespace net
255 255
256 #endif // NET_SOCKET_TCP_SOCKET_POSIX_H_ 256 #endif // NET_SOCKET_TCP_SOCKET_POSIX_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_impl.cc ('k') | net/socket/tcp_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698