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

Unified Diff: net/udp/udp_data_transfer_param.h

Issue 8200011: Add NetLog support to UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update year Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: net/udp/udp_data_transfer_param.h
===================================================================
--- net/udp/udp_data_transfer_param.h (revision 0)
+++ net/udp/udp_data_transfer_param.h (revision 0)
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 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_DATA_TRANSFER_PARAM_H_
+#define NET_UDP_UDP_DATA_TRANSFER_PARAM_H_
+#pragma once
+
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "net/base/net_log.h"
+
+namespace net {
+
+class IPEndPoint;
+
+// NetLog parameter to describe a UDP receive/send event. Each event has a
+// byte count, and may optionally have transferred bytes and an IPEndPoint as
+// well.
+class UDPDataTransferNetLogParam : public NetLog::EventParameters {
+ public:
+ // |bytes| are only logged when |log_bytes| is non-NULL.
+ // |address| may be NULL.
+ UDPDataTransferNetLogParam(int byte_count, const char* bytes, bool log_bytes,
+ const IPEndPoint* address);
+ virtual ~UDPDataTransferNetLogParam();
+
+ virtual base::Value* ToValue() const OVERRIDE;
+
+ private:
+ const int byte_count_;
+ const std::string hex_encoded_bytes_;
Sergey Ulanov 2011/10/13 04:01:54 Do we need to store this here. This object is crea
mmenke 2011/10/13 14:37:23 These may be accessed on other threads, after the
+ scoped_ptr<IPEndPoint> address_;
Sergey Ulanov 2011/10/13 04:01:54 Does this need to be a pointer? Can we store it by
mmenke 2011/10/13 14:37:23 We'll access it on another thread, so we can't do
+};
+
+} // namespace net
+
+#endif // NET_BASE_ADDRESS_LIST_NET_LOG_PARAM_H_
Property changes on: net\udp\udp_data_transfer_param.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698