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

Unified Diff: snapshot/memory_snapshot.h

Issue 689483003: snapshot: Make destructors of interface classes public and virtual (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « snapshot/mac/thread_snapshot_mac.h ('k') | snapshot/module_snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/memory_snapshot.h
diff --git a/snapshot/memory_snapshot.h b/snapshot/memory_snapshot.h
index e7d831668944bcb7db08d9ebc48156c4559d2513..f00610812eec8160a9040e33fd70c6604f6c0cc9 100644
--- a/snapshot/memory_snapshot.h
+++ b/snapshot/memory_snapshot.h
@@ -32,6 +32,8 @@ class MemorySnapshot {
//! data is read, it will be passed to a delegate method.
class Delegate {
public:
+ virtual ~Delegate() {}
+
//! \brief Called by MemorySnapshot::Read() to provide data requested by a
//! call to that method.
//!
@@ -43,11 +45,10 @@ class MemorySnapshot {
//! \return `true` on success, `false` on failure. MemoryDelegate::Read()
//! will use this as its own return value.
virtual bool MemorySnapshotDelegateRead(void* data, size_t size) = 0;
-
- protected:
- ~Delegate() {}
};
+ virtual ~MemorySnapshot() {}
+
//! \brief The base address of the memory snapshot in the snapshot process’
//! address space.
virtual uint64_t Address() const = 0;
@@ -68,9 +69,6 @@ class MemorySnapshot {
//! Delegate::MemorySnapshotDelegateRead(), which should be `true` on
//! success and `false` on failure.
virtual bool Read(Delegate* delegate) const = 0;
-
- protected:
- ~MemorySnapshot() {}
};
} // namespace crashpad
« no previous file with comments | « snapshot/mac/thread_snapshot_mac.h ('k') | snapshot/module_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698