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

Side by Side Diff: net/base/trace_net_log_observer.h

Issue 468083004: Use NESTABLE_ASYNC APIs to get NetLog data into Tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
(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 <stdio.h>
mmenke 2014/08/15 20:42:54 not used.
xunjieli 2014/08/15 21:55:16 Done. Sorry! I copied over another file. Should to
9
10 #include "base/debug/trace_event_impl.h"
11 #include "base/files/scoped_file.h"
mmenke 2014/08/15 20:42:54 Not used.
xunjieli 2014/08/15 21:55:16 Done.
12 #include "net/base/net_log.h"
13
14 namespace net {
15
16 class NET_EXPORT TraceNetLogObserver : public NetLog::ThreadSafeObserver,
mmenke 2014/08/15 20:42:54 Should include net/base/net_export.h
xunjieli 2014/08/15 21:55:16 Done. I see! Thanks!
17 public base::debug::TraceLog::EnabledStateObserver {
mmenke 2014/08/15 20:42:54 All parent classes should line up, so this should
xunjieli 2014/08/15 21:55:16 Done. Thanks! I will keep that in mind next time.
18 public:
19 TraceNetLogObserver();
20 virtual ~TraceNetLogObserver();
21
22 void set_log_level(NetLog::LogLevel log_level);
mmenke 2014/08/15 20:42:54 Only use this naming scheme when functions are inl
xunjieli 2014/08/15 21:55:16 Acknowledged. Also, I don't think we need the sett
23
24 void StartObserving(NetLog* net_log);
25
26 // Stops observing net_log(). Must already be watching.
27 void StopObserving();
28
29 // net::NetLog::ThreadSafeObserver implementation:
30 virtual void OnAddEntry(const NetLog::Entry& entry) OVERRIDE;
31
32 void WatchForTraceStart(NetLog* net_log);
33
34 void StopWatchForTraceStart();
35
36 // base::debug::TraceLog::EnabledStateChangedObserver overrides:
mmenke 2014/08/15 20:42:54 nit: overrides -> implementation, to be consiste
xunjieli 2014/08/15 21:55:16 Done.
37 virtual void OnTraceLogEnabled() OVERRIDE;
38 virtual void OnTraceLogDisabled() OVERRIDE;
39 private:
40 // The LogLevel to log at.
41 NetLog::LogLevel log_level_;
42
43 NetLog* net_log_;
44
45 DISALLOW_COPY_AND_ASSIGN(TraceNetLogObserver);
mmenke 2014/08/15 20:42:54 Should include base/macros.h for this and OVERRIDE
xunjieli 2014/08/15 21:55:16 Partially done. How should I "OVERRIDE" on this?
mmenke 2014/08/15 21:59:15 Sorry, I meant macros.h makes sure the "OVERRIDE"
xunjieli 2014/08/20 22:00:42 I see. That makes sense. Thank you! On 2014/08/15
46 };
47
48 } // namespace net
49
50 #endif // NET_BASE_TRACE_NET_LOG_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698