Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 BASE_TRACE_EVENT_MEMORY_TRACING_FRONTEND_H_ | |
| 6 #define BASE_TRACE_EVENT_MEMORY_TRACING_FRONTEND_H_ | |
| 7 | |
| 8 #include "base/trace_event/memory_dump_manager.h" | |
| 9 #include "base/trace_event/trace_event.h" | |
| 10 | |
| 11 namespace base { | |
| 12 | |
| 13 namespace trace_event { | |
| 14 | |
| 15 // This is the interface exposed to the rest of the codebase to deal with | |
| 16 // memory tracing. The main entry point for clients is represented by | |
| 17 // RequestDumpPoint(). The extension by Un(RegisterDumpProvider). | |
|
ssid
2017/04/14 23:33:09
What is RequestDumpPoint()
hjd
2017/04/19 09:54:56
...I'm not sure, I think I must have pasted some r
| |
| 18 class BASE_EXPORT MemoryTracingFrontend | |
|
ssid
2017/04/14 23:33:09
Why is this called frontend? Why not MemoryTracing
hjd
2017/04/19 09:54:56
Done.
| |
| 19 : public TraceLog::EnabledStateObserver { | |
| 20 public: | |
| 21 static const char* const kTraceCategory; | |
| 22 | |
| 23 static void Initialize(MemoryDumpManager*); | |
|
ssid
2017/04/14 23:33:09
Why do you need this argument?
hjd
2017/04/19 09:54:56
Gone in the new version.
| |
| 24 | |
| 25 MemoryTracingFrontend(TraceLog*, MemoryDumpManager*); | |
|
ssid
2017/04/14 23:33:09
Why are you passing these pointers to singleton?
hjd
2017/04/19 09:54:56
Code that uses singletons directly is difficult to
| |
| 26 ~MemoryTracingFrontend() override; | |
| 27 | |
| 28 // TraceLog::EnabledStateObserver implementation. | |
| 29 void OnTraceLogEnabled() override; | |
| 30 void OnTraceLogDisabled() override; | |
| 31 | |
| 32 private: | |
| 33 bool IsMemoryInfraTracingEnabled(); | |
| 34 bool enabled_; | |
| 35 MemoryDumpManager* memory_dump_manager_; | |
| 36 TraceLog* trace_log_; | |
| 37 }; | |
| 38 | |
| 39 } // namespace trace_event | |
| 40 } // namespace base | |
| 41 | |
| 42 #endif // BASE_TRACE_EVENT_MEMORY_TRACING_FRONTEND_H_ | |
| OLD | NEW |