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

Unified Diff: client/crash_report_database_win.cc

Issue 1004913004: win: Add UUID::InitializeFromSystemUUID() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Rebase 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 | util/misc/uuid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crash_report_database_win.cc
diff --git a/client/crash_report_database_win.cc b/client/crash_report_database_win.cc
index 28a64bc935e242fead7cf5b3618618608383bbe1..6dbaf0ea7b696c52eddf08c40013f6ddf3ef04a1 100644
--- a/client/crash_report_database_win.cc
+++ b/client/crash_report_database_win.cc
@@ -576,12 +576,9 @@ OperationStatus CrashReportDatabaseWin::PrepareNewCrashReport(
::UUID system_uuid;
if (UuidCreate(&system_uuid) != RPC_S_OK)
return kFileSystemError;
- static_assert(sizeof(system_uuid) == 16, "unexpected system uuid size");
- static_assert(offsetof(::UUID, Data1) == 0, "unexpected uuid layout");
scoped_ptr<NewReport> new_report(new NewReport());
- new_report->uuid.InitializeFromBytes(
- reinterpret_cast<const uint8_t*>(&system_uuid.Data1));
+ new_report->uuid.InitializeFromSystemUUID(&system_uuid);
new_report->path = base_dir_.Append(kReportsDirectory)
.Append(new_report->uuid.ToString16() + L"." +
kCrashReportFileExtension);
« no previous file with comments | « no previous file | util/misc/uuid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698