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

Side by Side Diff: base/trace_event/memory_tracing_observer.h

Issue 2861133002: memory-infra: Move dump level check to observer and rename session state (Closed)
Patch Set: move comment Created 3 years, 7 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #ifndef BASE_TRACE_EVENT_MEMORY_TRACING_OBSERVER_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_TRACING_OBSERVER_H_
6 #define BASE_TRACE_EVENT_MEMORY_TRACING_OBSERVER_H_ 6 #define BASE_TRACE_EVENT_MEMORY_TRACING_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/trace_event/memory_dump_manager.h" 9 #include "base/trace_event/memory_dump_manager.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // TraceLog::EnabledStateObserver implementation. 27 // TraceLog::EnabledStateObserver implementation.
28 void OnTraceLogEnabled() override; 28 void OnTraceLogEnabled() override;
29 void OnTraceLogDisabled() override; 29 void OnTraceLogDisabled() override;
30 30
31 bool AddDumpToTraceIfEnabled(const MemoryDumpRequestArgs*, 31 bool AddDumpToTraceIfEnabled(const MemoryDumpRequestArgs*,
32 const ProcessId, 32 const ProcessId,
33 const ProcessMemoryDump*); 33 const ProcessMemoryDump*);
34 34
35 private: 35 private:
36 // Returns true if the dump mode is allowed for current tracing session.
37 bool IsDumpModeAllowed(MemoryDumpLevelOfDetail) const;
38
36 MemoryDumpManager* const memory_dump_manager_; 39 MemoryDumpManager* const memory_dump_manager_;
37 TraceLog* const trace_log_; 40 TraceLog* const trace_log_;
41 std::unique_ptr<TraceConfig::MemoryDumpConfig> memory_dump_config_;
38 42
39 DISALLOW_COPY_AND_ASSIGN(MemoryTracingObserver); 43 DISALLOW_COPY_AND_ASSIGN(MemoryTracingObserver);
40 }; 44 };
41 45
42 } // namespace trace_event 46 } // namespace trace_event
43 } // namespace base 47 } // namespace base
44 48
45 #endif // BASE_TRACE_EVENT_MEMORY_TRACING_OBSERVER_H_ 49 #endif // BASE_TRACE_EVENT_MEMORY_TRACING_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698