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

Unified Diff: snapshot/test/test_process_snapshot.h

Issue 1377133006: Mostly-boilerplate to add MemoryMapSnapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@memory-info-to-misc
Patch Set: fixes Created 5 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/snapshot.gyp ('k') | snapshot/test/test_process_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « snapshot/snapshot.gyp ('k') | snapshot/test/test_process_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698