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

Unified Diff: snapshot/test/test_process_snapshot.h

Issue 1407643004: Some plumbing for the beginning of getting handles into snapshot/minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@handles-redux
Patch Set: . 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 2f5cd45a1a1b6d830e7da73dcd4a04c6552f0eea..ec12448172fb1a71aa03ba3867d99e6d4b3d8001 100644
--- a/snapshot/test/test_process_snapshot.h
+++ b/snapshot/test/test_process_snapshot.h
@@ -106,6 +106,13 @@ class TestProcessSnapshot final : public ProcessSnapshot {
memory_map_.push_back(region.release());
}
+ //! \brief Adds a handle snapshot to be returned by Handles().
+ //!
+ //! \param[in] region The handle snapshot that will be included in Handles().
+ void AddHandle(const HandleSnapshot& handle) {
+ handles_.push_back(handle);
+ }
+
//! \brief Add a memory snapshot to be returned by ExtraMemory().
//!
//! \param[in] extra_memory The memory snapshot that will be included in
@@ -131,6 +138,7 @@ class TestProcessSnapshot final : public ProcessSnapshot {
std::vector<const ModuleSnapshot*> Modules() const override;
const ExceptionSnapshot* Exception() const override;
std::vector<const MemoryMapRegionSnapshot*> MemoryMap() const override;
+ std::vector<HandleSnapshot> Handles() const override;
std::vector<const MemorySnapshot*> ExtraMemory() const override;
private:
@@ -148,6 +156,7 @@ class TestProcessSnapshot final : public ProcessSnapshot {
PointerVector<ModuleSnapshot> modules_;
scoped_ptr<ExceptionSnapshot> exception_;
PointerVector<MemoryMapRegionSnapshot> memory_map_;
+ std::vector<HandleSnapshot> handles_;
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