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

Unified Diff: net/base/trace_net_log_observer.cc

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/escape_unittest.cc ('k') | net/base/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/trace_net_log_observer.cc
diff --git a/net/base/trace_net_log_observer.cc b/net/base/trace_net_log_observer.cc
index 15960c3b43d674290b228b5296847ed337ce1f4a..5d98c41d37b4cce2154fd12ac673f44547298624 100644
--- a/net/base/trace_net_log_observer.cc
+++ b/net/base/trace_net_log_observer.cc
@@ -19,6 +19,9 @@ namespace net {
namespace {
+// TraceLog category for NetLog events.
+const char kNetLogTracingCategory[] = TRACE_DISABLED_BY_DEFAULT("netlog");
+
class TracedValue : public base::debug::ConvertableToTraceFormat {
public:
explicit TracedValue(scoped_ptr<base::Value> value) : value_(value.Pass()) {}
@@ -55,21 +58,24 @@ void TraceNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
switch (entry.phase()) {
case NetLog::PHASE_BEGIN:
TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(
- "netlog", NetLog::EventTypeToString(entry.type()), entry.source().id,
+ kNetLogTracingCategory,
+ NetLog::EventTypeToString(entry.type()), entry.source().id,
"source_type", NetLog::SourceTypeToString(entry.source().type),
"params", scoped_refptr<base::debug::ConvertableToTraceFormat>(
new TracedValue(params.Pass())));
break;
case NetLog::PHASE_END:
TRACE_EVENT_NESTABLE_ASYNC_END2(
- "netlog", NetLog::EventTypeToString(entry.type()), entry.source().id,
+ kNetLogTracingCategory,
+ NetLog::EventTypeToString(entry.type()), entry.source().id,
"source_type", NetLog::SourceTypeToString(entry.source().type),
"params", scoped_refptr<base::debug::ConvertableToTraceFormat>(
new TracedValue(params.Pass())));
break;
case NetLog::PHASE_NONE:
TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(
- "netlog", NetLog::EventTypeToString(entry.type()), entry.source().id,
+ kNetLogTracingCategory,
+ NetLog::EventTypeToString(entry.type()), entry.source().id,
"source_type", NetLog::SourceTypeToString(entry.source().type),
"params", scoped_refptr<base::debug::ConvertableToTraceFormat>(
new TracedValue(params.Pass())));
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/base/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698