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

Unified Diff: net/base/net_log.cc

Issue 10542153: NetLogEventParameter to Callback refactoring 11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/base/net_log.cc
===================================================================
--- net/base/net_log.cc (revision 142108)
+++ net/base/net_log.cc (working copy)
@@ -55,6 +55,14 @@
return event_params;
}
+Value* NetLogInt64Callback(const char* name,
+ int64 value,
+ NetLog::LogLevel /* log_level */) {
+ DictionaryValue* event_params = new DictionaryValue();
+ event_params->SetString(name, base::Int64ToString(value));
+ return event_params;
+}
+
Value* NetLogStringCallback(const char* name,
const std::string* value,
NetLog::LogLevel /* log_level */) {
@@ -283,6 +291,12 @@
}
// static
+NetLog::ParametersCallback NetLog::Int64Callback(const char* name,
+ int64 value) {
+ return base::Bind(&NetLogInt64Callback, name, value);
+}
+
+// static
NetLog::ParametersCallback NetLog::StringCallback(const char* name,
const std::string* value) {
DCHECK(value);

Powered by Google App Engine
This is Rietveld 408576698