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

Unified Diff: minidump/test/minidump_writable_test_util.cc

Issue 1419623003: Write MINIDUMP_HANDLE_DATA_STREAM to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
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
Index: minidump/test/minidump_writable_test_util.cc
diff --git a/minidump/test/minidump_writable_test_util.cc b/minidump/test/minidump_writable_test_util.cc
index ef00f40a610f3bed68d7219d11d01225a9ad3bc7..c8ea4f44c91ed0a42f23d9b46b697608bd6b352b 100644
--- a/minidump/test/minidump_writable_test_util.cc
+++ b/minidump/test/minidump_writable_test_util.cc
@@ -181,6 +181,14 @@ struct MinidumpThreadListTraits {
}
};
+struct MinidumpHandleDataStreamTraits {
+ using ListType = MINIDUMP_HANDLE_DATA_STREAM;
+ enum : size_t { kElementSize = sizeof(MINIDUMP_HANDLE_DESCRIPTOR) };
+ static size_t ElementCount(const ListType* list) {
+ return static_cast<size_t>(list->NumberOfDescriptors);
+ }
+};
+
struct MinidumpMemoryInfoListTraits {
using ListType = MINIDUMP_MEMORY_INFO_LIST;
enum : size_t { kElementSize = sizeof(MINIDUMP_MEMORY_INFO) };
@@ -253,6 +261,14 @@ const MINIDUMP_THREAD_LIST* MinidumpWritableAtLocationDescriptor<
}
template <>
+const MINIDUMP_HANDLE_DATA_STREAM* MinidumpWritableAtLocationDescriptor<
+ MINIDUMP_HANDLE_DATA_STREAM>(const std::string& file_contents,
+ const MINIDUMP_LOCATION_DESCRIPTOR& location) {
+ return MinidumpListAtLocationDescriptor<MinidumpHandleDataStreamTraits>(
+ file_contents, location);
+}
+
+template <>
const MINIDUMP_MEMORY_INFO_LIST* MinidumpWritableAtLocationDescriptor<
MINIDUMP_MEMORY_INFO_LIST>(const std::string& file_contents,
const MINIDUMP_LOCATION_DESCRIPTOR& location) {

Powered by Google App Engine
This is Rietveld 408576698