Chromium Code Reviews| Index: net/base/trace_net_log_observer.h |
| diff --git a/net/base/trace_net_log_observer.h b/net/base/trace_net_log_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..358dd98da0c1915ac196c7a01a518d4f84017ed8 |
| --- /dev/null |
| +++ b/net/base/trace_net_log_observer.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_BASE_TRACE_NET_LOG_OBSERVER_H_ |
| +#define NET_BASE_TRACE_NET_LOG_OBSERVER_H_ |
| + |
| +#include "base/debug/trace_event_impl.h" |
| +#include "base/macros.h" |
| +#include "net/base/net_export.h" |
| +#include "net/base/net_log.h" |
| + |
| +namespace net { |
| + |
| +class NET_EXPORT TraceNetLogObserver |
| + : public NetLog::ThreadSafeObserver, |
| + public base::debug::TraceLog::EnabledStateObserver { |
| + public: |
| + TraceNetLogObserver(); |
| + virtual ~TraceNetLogObserver(); |
| + |
| + // net::NetLog::ThreadSafeObserver implementation: |
| + virtual void OnAddEntry(const NetLog::Entry& entry) OVERRIDE; |
| + |
| + void WatchForTraceStart(NetLog* net_log); |
| + |
| + void StopWatchForTraceStart(); |
| + |
| + // base::debug::TraceLog::EnabledStateChangedObserver implementation: |
| + virtual void OnTraceLogEnabled() OVERRIDE; |
| + virtual void OnTraceLogDisabled() OVERRIDE; |
| + |
| + private: |
| + // The LogLevel to log at. |
| + NetLog::LogLevel log_level_; |
|
mmenke
2014/08/22 18:28:14
No longer used.
xunjieli
2014/08/22 19:04:39
Oops. Sorry. Should be gone now. Thanks!
On 2014/0
|
| + |
| + NetLog* net_log_to_watch_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TraceNetLogObserver); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_BASE_TRACE_NET_LOG_OBSERVER_H_ |