Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / net / socket / socket_net_log_params.h
blobb432667d4a687dd1f9b3327d61e3c0581e01a6a8
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
3 // found in the LICENSE file.
5 #ifndef NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_
6 #define NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_
8 #include "net/base/sys_addrinfo.h"
9 #include "net/log/net_log.h"
11 namespace net {
13 class HostPortPair;
14 class IPEndPoint;
16 // Creates a NetLog callback for socket error events.
17 NetLog::ParametersCallback CreateNetLogSocketErrorCallback(int net_error,
18 int os_error);
20 // Creates a NetLog callback for a HostPortPair.
21 // |host_and_port| must remain valid for the lifetime of the returned callback.
22 NetLog::ParametersCallback CreateNetLogHostPortPairCallback(
23 const HostPortPair* host_and_port);
25 // Creates a NetLog callback for an IPEndPoint.
26 // |address| must remain valid for the lifetime of the returned callback.
27 NetLog::ParametersCallback CreateNetLogIPEndPointCallback(
28 const IPEndPoint* address);
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.
32 NetLog::ParametersCallback CreateNetLogSourceAddressCallback(
33 const struct sockaddr* net_address,
34 socklen_t address_len);
36 } // namespace net
38 #endif // NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_