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

Unified Diff: minidump/minidump_crashpad_info_writer.cc

Issue 998033002: Carry the client ID from the database all the way through upload (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 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 | « minidump/minidump_crashpad_info_writer.h ('k') | minidump/minidump_crashpad_info_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_crashpad_info_writer.cc
diff --git a/minidump/minidump_crashpad_info_writer.cc b/minidump/minidump_crashpad_info_writer.cc
index b60b2e16c6d548001bc5e685d666b7d08c724c63..d8bdb0d36598450cd9071f949cedd842c547b5bc 100644
--- a/minidump/minidump_crashpad_info_writer.cc
+++ b/minidump/minidump_crashpad_info_writer.cc
@@ -38,6 +38,10 @@ void MinidumpCrashpadInfoWriter::InitializeFromSnapshot(
DCHECK_EQ(state(), kStateMutable);
DCHECK(!module_list_);
+ UUID client_id;
+ process_snapshot->ClientID(&client_id);
+ SetClientID(client_id);
+
auto simple_annotations =
make_scoped_ptr(new MinidumpSimpleStringDictionaryWriter());
simple_annotations->InitializeFromMap(
@@ -54,6 +58,12 @@ void MinidumpCrashpadInfoWriter::InitializeFromSnapshot(
}
}
+void MinidumpCrashpadInfoWriter::SetClientID(const UUID& client_id) {
+ DCHECK_EQ(state(), kStateMutable);
+
+ crashpad_info_.client_id = client_id;
+}
+
void MinidumpCrashpadInfoWriter::SetSimpleAnnotations(
scoped_ptr<MinidumpSimpleStringDictionaryWriter> simple_annotations) {
DCHECK_EQ(state(), kStateMutable);
@@ -118,7 +128,9 @@ MinidumpStreamType MinidumpCrashpadInfoWriter::StreamType() const {
}
bool MinidumpCrashpadInfoWriter::IsUseful() const {
- return simple_annotations_ || module_list_;
+ return crashpad_info_.client_id != UUID() ||
+ simple_annotations_ ||
+ module_list_;
}
} // namespace crashpad
« no previous file with comments | « minidump/minidump_crashpad_info_writer.h ('k') | minidump/minidump_crashpad_info_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698