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

Unified Diff: net/base/net_log.h

Issue 2363003: Rework the logging for sockets/connectjobs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « chrome_frame/test/test_server_test.cc ('k') | net/base/net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log.h
===================================================================
--- net/base/net_log.h (revision 48758)
+++ net/base/net_log.h (working copy)
@@ -53,7 +53,7 @@
// The "source" identifies the entity that generated the log message.
enum SourceType {
-#define SOURCE_TYPE(label) SOURCE_ ## label,
+#define SOURCE_TYPE(label, value) SOURCE_ ## label = value,
#include "net/base/net_log_source_type_list.h"
#undef SOURCE_TYPE
};
@@ -206,6 +206,25 @@
const int value_;
};
+// NetLogSourceParameter is a subclass of EventParameters that encapsulates a
+// single NetLog::Source parameter.
+class NetLogSourceParameter : public NetLog::EventParameters {
+ public:
+ // |name| must be a string literal.
+ NetLogSourceParameter(const char* name, const NetLog::Source& value)
+ : name_(name), value_(value) {}
+
+ const NetLog::Source& value() const {
+ return value_;
+ }
+
+ virtual Value* ToValue() const;
+
+ private:
+ const char* name_;
+ const NetLog::Source value_;
+};
+
} // namespace net
#endif // NET_BASE_NET_LOG_H_
« no previous file with comments | « chrome_frame/test/test_server_test.cc ('k') | net/base/net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698