Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / net / base / trace_net_log_observer.cc
index fb4f054..5d98c41 100644 (file)
@@ -19,14 +19,17 @@ 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()) {}
 
  private:
-  virtual ~TracedValue() {}
+  ~TracedValue() override {}
 
-  virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE {
+  void AppendAsTraceFormat(std::string* out) const override {
     if (value_) {
       std::string tmp;
       base::JSONWriter::Write(value_.get(), &tmp);
@@ -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())));