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

Unified Diff: base/trace_event/memory_dump_session_state.h

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: base/trace_event/memory_dump_session_state.h
diff --git a/base/trace_event/memory_dump_session_state.h b/base/trace_event/memory_dump_session_state.h
index 6834471b9a760db062ba02cd1ef6d4f39d3082fe..879545f658f2e9cea464d058f304a4838de071cf 100644
--- a/base/trace_event/memory_dump_session_state.h
+++ b/base/trace_event/memory_dump_session_state.h
@@ -6,7 +6,7 @@
#define BASE_TRACE_EVENT_MEMORY_DUMP_SESSION_STATE_H_
#include "base/base_export.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/trace_event/heap_profiler_stack_frame_deduplicator.h"
#include "base/trace_event/heap_profiler_type_name_deduplicator.h"
@@ -18,33 +18,37 @@ namespace trace_event {
class BASE_EXPORT MemoryDumpSessionState
: public RefCountedThreadSafe<MemoryDumpSessionState> {
public:
- MemoryDumpSessionState(
- const scoped_refptr<StackFrameDeduplicator>& stack_frame_deduplicator,
- const scoped_refptr<TypeNameDeduplicator>& type_name_deduplicator);
+ MemoryDumpSessionState();
// Returns the stack frame deduplicator that should be used by memory dump
// providers when doing a heap dump.
- StackFrameDeduplicator* stack_frame_deduplicator() {
+ StackFrameDeduplicator* stack_frame_deduplicator() const {
return stack_frame_deduplicator_.get();
}
+ void SetStackFrameDeduplicator(
+ scoped_ptr<StackFrameDeduplicator> stack_frame_deduplicator);
+
// Returns the type name deduplicator that should be used by memory dump
// providers when doing a heap dump.
- TypeNameDeduplicator* type_name_deduplicator() {
+ TypeNameDeduplicator* type_name_deduplicator() const {
return type_name_deduplicator_.get();
}
+ void SetTypeNameDeduplicator(
+ scoped_ptr<TypeNameDeduplicator> type_name_deduplicator);
+
private:
friend class RefCountedThreadSafe<MemoryDumpSessionState>;
~MemoryDumpSessionState();
// Deduplicates backtraces in heap dumps so they can be written once when the
// trace is finalized.
- scoped_refptr<StackFrameDeduplicator> stack_frame_deduplicator_;
+ scoped_ptr<StackFrameDeduplicator> stack_frame_deduplicator_;
// Deduplicates type names in heap dumps so they can be written once when the
// trace is finalized.
- scoped_refptr<TypeNameDeduplicator> type_name_deduplicator_;
+ scoped_ptr<TypeNameDeduplicator> type_name_deduplicator_;
};
} // namespace trace_event

Powered by Google App Engine
This is Rietveld 408576698