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

Unified Diff: handler/mac/crash_report_exception_handler.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 | « no previous file | handler/mac/crash_report_upload_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: handler/mac/crash_report_exception_handler.cc
diff --git a/handler/mac/crash_report_exception_handler.cc b/handler/mac/crash_report_exception_handler.cc
index 5fe76507750be58bd229d0609c1d410160360e82..e9d1115a82c828e7e889b6d7cff7040eab05c44e 100644
--- a/handler/mac/crash_report_exception_handler.cc
+++ b/handler/mac/crash_report_exception_handler.cc
@@ -21,6 +21,7 @@
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/strings/stringprintf.h"
+#include "client/settings.h"
#include "minidump/minidump_file_writer.h"
#include "snapshot/mac/process_snapshot_mac.h"
#include "util/file/file_writer.h"
@@ -126,6 +127,16 @@ kern_return_t CrashReportExceptionHandler::CatchMachException(
return KERN_FAILURE;
}
+ UUID client_id;
+ Settings* const settings = database_->GetSettings();
+ if (settings) {
+ // If GetSettings() or GetClientID() fails, something else will log a
+ // message and client_id will be left at its default value, all zeroes,
+ // which is appropriate.
+ settings->GetClientID(&client_id);
+ }
+
+ process_snapshot.SetClientID(client_id);
process_snapshot.SetAnnotationsSimpleMap(*process_annotations_);
CrashReportDatabase::NewReport* new_report;
« no previous file with comments | « no previous file | handler/mac/crash_report_upload_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698