| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/trace_net_log_observer.h" | 5 #include "net/base/trace_net_log_observer.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/debug/trace_event.h" | |
| 12 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/trace_event/trace_event.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "net/base/net_log.h" | 16 #include "net/base/net_log.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // TraceLog category for NetLog events. | 22 // TraceLog category for NetLog events. |
| 23 const char kNetLogTracingCategory[] = TRACE_DISABLED_BY_DEFAULT("netlog"); | 23 const char kNetLogTracingCategory[] = TRACE_DISABLED_BY_DEFAULT("netlog"); |
| 24 | 24 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 net_log_to_watch_->AddThreadSafeObserver(this, | 103 net_log_to_watch_->AddThreadSafeObserver(this, |
| 104 NetLog::LOG_STRIP_PRIVATE_DATA); | 104 NetLog::LOG_STRIP_PRIVATE_DATA); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void TraceNetLogObserver::OnTraceLogDisabled() { | 107 void TraceNetLogObserver::OnTraceLogDisabled() { |
| 108 if (net_log()) | 108 if (net_log()) |
| 109 net_log()->RemoveThreadSafeObserver(this); | 109 net_log()->RemoveThreadSafeObserver(this); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace net | 112 } // namespace net |
| OLD | NEW |