summaryrefslogtreecommitdiffstats
path: root/net/udp/udp_net_log_parameters.h
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 02:47:59 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 02:47:59 +0000
commit2584ea13f563336f9d6cb3d238b18bb2ddf258a7 (patch)
tree48e06bb23ef5656c9fb18579cc5d982732ff03f0 /net/udp/udp_net_log_parameters.h
parent29906c566b079bfefd50994d768565d9d6332512 (diff)
downloadchromium_src-2584ea13f563336f9d6cb3d238b18bb2ddf258a7.zip
chromium_src-2584ea13f563336f9d6cb3d238b18bb2ddf258a7.tar.gz
chromium_src-2584ea13f563336f9d6cb3d238b18bb2ddf258a7.tar.bz2
NetLogEventParameter to Callback refactoring 4.
Get rid of all uses of NetLogEventParameters in net/udp and net/dns. R=eroman@chromium.org BUG=126243 Review URL: https://chromiumcodereview.appspot.com/10546133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp/udp_net_log_parameters.h')
-rw-r--r--net/udp/udp_net_log_parameters.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/udp/udp_net_log_parameters.h b/net/udp/udp_net_log_parameters.h
new file mode 100644
index 0000000..0db1b87
--- /dev/null
+++ b/net/udp/udp_net_log_parameters.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_UDP_UDP_NET_LOG_PARAMETERS_H_
+#define NET_UDP_UDP_NET_LOG_PARAMETERS_H_
+#pragma once
+
+#include "net/base/net_log.h"
+
+namespace net {
+
+class IPEndPoint;
+
+// Creates a NetLog callback that returns parameters describing a UDP
+// receive/send event. |bytes| are only logged when byte logging is
+// enabled. |address| may be NULL. |address| (if given) and |bytes|
+// must be valid for the life of the callback.
+NetLog::ParametersCallback CreateNetLogUDPDataTranferCallback(
+ int byte_count,
+ const char* bytes,
+ const IPEndPoint* address);
+
+// Creates a NetLog callback that returns parameters describing a UDP
+// connect event. |address| cannot be NULL, and must remain valid for
+// the lifetime of the callback.
+NetLog::ParametersCallback CreateNetLogUDPConnectCallback(
+ const IPEndPoint* address);
+
+} // namespace net
+
+#endif // NET_UDP_UDP_NET_LOG_PARAMETERS_H_