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

Unified Diff: net/base/net_log.cc

Issue 8200011: Add NetLog support to UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: ??? 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
« no previous file with comments | « net/base/net_log.h ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log.cc
===================================================================
--- net/base/net_log.cc (revision 106059)
+++ net/base/net_log.cc (working copy)
@@ -192,9 +192,18 @@
AddEntry(event_type, NetLog::PHASE_END, params);
}
+void BoundNetLog::AddEventWithNetErrorCode(NetLog::EventType event_type,
+ int net_error) const {
+ DCHECK_GT(0, net_error);
+ DCHECK_NE(ERR_IO_PENDING, net_error);
+ AddEvent(
+ event_type,
+ make_scoped_refptr(new NetLogIntegerParameter("net_error", net_error)));
+}
+
void BoundNetLog::EndEventWithNetErrorCode(NetLog::EventType event_type,
int net_error) const {
- DCHECK_NE(net_error, ERR_IO_PENDING);
+ DCHECK_NE(ERR_IO_PENDING, net_error);
if (net_error >= 0) {
EndEvent(event_type, NULL);
} else {
@@ -205,7 +214,8 @@
}
void BoundNetLog::AddByteTransferEvent(NetLog::EventType event_type,
- int byte_count, char* bytes) const {
+ int byte_count,
+ const char* bytes) const {
scoped_refptr<NetLog::EventParameters> params;
if (IsLoggingBytes()) {
params = new NetLogBytesTransferredParameter(byte_count, bytes);
« no previous file with comments | « net/base/net_log.h ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698