Index: snapshot/test/test_process_snapshot.h |
diff --git a/snapshot/test/test_process_snapshot.h b/snapshot/test/test_process_snapshot.h |
index a30d82a3eeb4d2063ee215ed108d8d5078dd884b..da0fca1dc658a36c8d82e80c3eff65041990cf5a 100644 |
--- a/snapshot/test/test_process_snapshot.h |
+++ b/snapshot/test/test_process_snapshot.h |
@@ -26,6 +26,7 @@ |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
#include "snapshot/exception_snapshot.h" |
+#include "snapshot/memory_map_snapshot.h" |
#include "snapshot/memory_snapshot.h" |
#include "snapshot/module_snapshot.h" |
#include "snapshot/process_snapshot.h" |
@@ -96,6 +97,15 @@ class TestProcessSnapshot final : public ProcessSnapshot { |
exception_ = exception.Pass(); |
} |
+ //! \brief Sets the memory map snapshot to be returned by MemoryMap(). |
+ //! |
+ //! \param[in] memory_map The memory map snapshot that MemoryMap() will |
+ //! return. The TestProcessSnapshot object takes ownership of \a |
+ //! memory_map. |
+ void SetMemoryMap(scoped_ptr<MemoryMapSnapshot> memory_map) { |
+ memory_map_ = memory_map.Pass(); |
+ } |
+ |
//! \brief Add a memory snapshot to be returned by ExtraMemory(). |
//! |
//! \param[in] extra_memory The memory snapshot that will be included in |
@@ -120,6 +130,7 @@ class TestProcessSnapshot final : public ProcessSnapshot { |
std::vector<const ThreadSnapshot*> Threads() const override; |
std::vector<const ModuleSnapshot*> Modules() const override; |
const ExceptionSnapshot* Exception() const override; |
+ const MemoryMapSnapshot* MemoryMap() const override; |
std::vector<const MemorySnapshot*> ExtraMemory() const override; |
private: |
@@ -136,6 +147,7 @@ class TestProcessSnapshot final : public ProcessSnapshot { |
PointerVector<ThreadSnapshot> threads_; |
PointerVector<ModuleSnapshot> modules_; |
scoped_ptr<ExceptionSnapshot> exception_; |
+ scoped_ptr<MemoryMapSnapshot> memory_map_; |
PointerVector<MemorySnapshot> extra_memory_; |
DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot); |