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..2f5cd45a1a1b6d830e7da73dcd4a04c6552f0eea 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_region_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 Adds a memory map region snapshot to be returned by MemoryMap(). |
+ //! |
+ //! \param[in] region The memory map region snapshot that will be included in |
+ //! MemoryMap(). The TestProcessSnapshot object takes ownership of \a |
+ //! region. |
+ void AddMemoryMapRegion(scoped_ptr<MemoryMapRegionSnapshot> region) { |
+ memory_map_.push_back(region.release()); |
+ } |
+ |
//! \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; |
+ std::vector<const MemoryMapRegionSnapshot*> 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_; |
+ PointerVector<MemoryMapRegionSnapshot> memory_map_; |
PointerVector<MemorySnapshot> extra_memory_; |
DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot); |