OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_BASE_TRACE_NET_LOG_OBSERVER_H_ | |
6 #define NET_BASE_TRACE_NET_LOG_OBSERVER_H_ | |
7 | |
8 #include "base/debug/trace_event_impl.h" | |
9 #include "base/macros.h" | |
10 #include "net/base/net_export.h" | |
11 #include "net/base/net_log.h" | |
12 | |
13 namespace net { | |
14 | |
15 class NET_EXPORT TraceNetLogObserver | |
mmenke
2014/08/27 19:03:14
Should add class level comments, and also document
xunjieli
2014/09/02 16:37:33
Done.
| |
16 : public NetLog::ThreadSafeObserver, | |
17 public base::debug::TraceLog::EnabledStateObserver { | |
18 public: | |
19 TraceNetLogObserver(); | |
20 virtual ~TraceNetLogObserver(); | |
21 | |
22 // net::NetLog::ThreadSafeObserver implementation: | |
23 virtual void OnAddEntry(const NetLog::Entry& entry) OVERRIDE; | |
24 | |
25 void WatchForTraceStart(NetLog* net_log); | |
26 | |
27 void StopWatchForTraceStart(); | |
28 | |
29 // base::debug::TraceLog::EnabledStateChangedObserver implementation: | |
30 virtual void OnTraceLogEnabled() OVERRIDE; | |
31 virtual void OnTraceLogDisabled() OVERRIDE; | |
32 | |
33 private: | |
34 NetLog* net_log_to_watch_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(TraceNetLogObserver); | |
37 }; | |
38 | |
39 } // namespace net | |
40 | |
41 #endif // NET_BASE_TRACE_NET_LOG_OBSERVER_H_ | |
OLD | NEW |