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

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: mac2 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..379d2cc70efd7fb9f462366a0152b3cf46f79a78 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"
@@ -71,6 +72,12 @@ class TestProcessSnapshot final : public ProcessSnapshot {
//! TestProcessSnapshot object takes ownership of \a system.
void SetSystem(scoped_ptr<SystemSnapshot> system) { system_ = system.Pass(); }
+ //! \brief Sets the PEB snapshot to be returned by ExtraMemory().
+ //!
+ //! \param[in] peb The PEB snapshot that ExtraMemory() will include. The
+ //! TestProcessSnapshot object takes ownership of \a peb.
+ void SetPeb(scoped_ptr<MemorySnapshot> peb) { peb_ = peb.Pass(); }
Mark Mentovai 2015/09/25 17:05:35 AddExtraMemory() instead, now. Like AddThread() an
Mark Mentovai 2015/09/25 17:05:35 Since the getters are declared in the order (threa
scottmg 2015/09/25 17:29:31 Done.
scottmg 2015/09/25 17:29:31 Done.
+
//! \brief Adds a thread snapshot to be returned by Threads().
//!
//! \param[in] thread The thread snapshot that will be included in Threads().
@@ -110,6 +117,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_;
@@ -122,6 +130,7 @@ class TestProcessSnapshot final : public ProcessSnapshot {
UUID client_id_;
std::map<std::string, std::string> annotations_simple_map_;
scoped_ptr<SystemSnapshot> system_;
+ scoped_ptr<MemorySnapshot> peb_;
Mark Mentovai 2015/09/25 17:05:35 Likewise.
scottmg 2015/09/25 17:29:31 Done.
PointerVector<ThreadSnapshot> threads_;
PointerVector<ModuleSnapshot> modules_;
scoped_ptr<ExceptionSnapshot> exception_;

Powered by Google App Engine
This is Rietveld 408576698