| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SOCKET_NET_LOG_PARAMS_H_ | 5 #ifndef NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_ |
| 6 #define NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_ | 6 #define NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_ |
| 7 | 7 |
| 8 #include "net/base/sys_addrinfo.h" | 8 #include "net/base/sys_addrinfo.h" |
| 9 #include "net/log/net_log.h" | 9 #include "net/log/net_log_parameters_callback.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 class HostPortPair; | 13 class HostPortPair; |
| 14 class IPEndPoint; | 14 class IPEndPoint; |
| 15 | 15 |
| 16 // Creates a NetLog callback for socket error events. | 16 // Creates a NetLog callback for socket error events. |
| 17 NetLog::ParametersCallback CreateNetLogSocketErrorCallback(int net_error, | 17 NetLogParametersCallback CreateNetLogSocketErrorCallback(int net_error, |
| 18 int os_error); | 18 int os_error); |
| 19 | 19 |
| 20 // Creates a NetLog callback for a HostPortPair. | 20 // Creates a NetLog callback for a HostPortPair. |
| 21 // |host_and_port| must remain valid for the lifetime of the returned callback. | 21 // |host_and_port| must remain valid for the lifetime of the returned callback. |
| 22 NetLog::ParametersCallback CreateNetLogHostPortPairCallback( | 22 NetLogParametersCallback CreateNetLogHostPortPairCallback( |
| 23 const HostPortPair* host_and_port); | 23 const HostPortPair* host_and_port); |
| 24 | 24 |
| 25 // Creates a NetLog callback for an IPEndPoint. | 25 // Creates a NetLog callback for an IPEndPoint. |
| 26 // |address| must remain valid for the lifetime of the returned callback. | 26 // |address| must remain valid for the lifetime of the returned callback. |
| 27 NetLog::ParametersCallback CreateNetLogIPEndPointCallback( | 27 NetLogParametersCallback CreateNetLogIPEndPointCallback( |
| 28 const IPEndPoint* address); | 28 const IPEndPoint* address); |
| 29 | 29 |
| 30 // Creates a NetLog callback for the source sockaddr on connect events. | 30 // Creates a NetLog callback for the source sockaddr on connect events. |
| 31 // |net_address| must remain valid for the lifetime of the returned callback. | 31 // |net_address| must remain valid for the lifetime of the returned callback. |
| 32 NetLog::ParametersCallback CreateNetLogSourceAddressCallback( | 32 NetLogParametersCallback CreateNetLogSourceAddressCallback( |
| 33 const struct sockaddr* net_address, | 33 const struct sockaddr* net_address, |
| 34 socklen_t address_len); | 34 socklen_t address_len); |
| 35 | 35 |
| 36 } // namespace net | 36 } // namespace net |
| 37 | 37 |
| 38 #endif // NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_ | 38 #endif // NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_ |
| OLD | NEW |