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

Unified Diff: snapshot/test/test_process_snapshot.h

Issue 1364053002: win: Save contents of PEB to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-teb
Patch Set: fixes Created 5 years, 3 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: snapshot/test/test_process_snapshot.h
diff --git a/snapshot/test/test_process_snapshot.h b/snapshot/test/test_process_snapshot.h
index 3d742f1658598c964c7f071105b1d01f4f387435..361559f59cfa3747fadb932954893fd4f0a19b54 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_snapshot.h"
#include "snapshot/module_snapshot.h"
#include "snapshot/process_snapshot.h"
#include "snapshot/system_snapshot.h"
@@ -95,6 +96,14 @@ class TestProcessSnapshot final : public ProcessSnapshot {
exception_ = exception.Pass();
}
+ //! \brief Add a memory snapshot to be returned by ExtraMemory().
+ //!
+ //! \param[in] peb The memory snapshot that will be included in ExtraMemory().
+ //! The TestProcessSnapshot object takes ownership of \a extra_memory.
+ void AddExtraMemory(scoped_ptr<MemorySnapshot> extra_memory) {
+ extra_memory_.push_back(extra_memory.release());
+ }
+
// ProcessSnapshot:
pid_t ProcessID() const override;
@@ -110,6 +119,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 MemorySnapshot*> ExtraMemory() const override;
private:
pid_t process_id_;
@@ -125,6 +135,7 @@ class TestProcessSnapshot final : public ProcessSnapshot {
PointerVector<ThreadSnapshot> threads_;
PointerVector<ModuleSnapshot> modules_;
scoped_ptr<ExceptionSnapshot> exception_;
+ PointerVector<MemorySnapshot> extra_memory_;
DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot);
};

Powered by Google App Engine
This is Rietveld 408576698