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

Issue 1004913004: win: Add UUID::InitializeFromSystemUUID() (Closed)

Created:
5 years, 9 months ago by Mark Mentovai
Modified:
5 years, 9 months ago
Reviewers:
scottmg
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

win: Add UUID::InitializeFromSystemUUID(). The new call is also used in CrashReportDatabaseWin::PrepareNewCrashReport(). Previously, that method used the UUID::InitializeFromBytes() constructor. That actually caused various fields of the UUID to be byte-swapped so that the ::UUID and crashpad::UUID would be different UUIDs. Although a UUID is mostly random, the version field in data_3 is used as a namespace and should be 4 for random UUIDs, and this was not the case under swapping. TEST=crashpad_util_test UUID.FromSystem BUG=crashpad:1 R=scottmg@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/e7b80a52f5b9832814485b58f66d4b13117a5186

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : Address review feedback #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -5 lines) Patch
M client/crash_report_database_win.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M util/misc/uuid.h View 2 chunks +12 lines, -1 line 0 comments Download
M util/misc/uuid.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M util/misc/uuid_test.cc View 1 2 2 chunks +28 lines, -0 lines 0 comments Download
M util/util.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Mark Mentovai
5 years, 9 months ago (2015-03-13 16:44:01 UTC) #2
scottmg
lgtm https://codereview.chromium.org/1004913004/diff/20001/util/misc/uuid_test.cc File util/misc/uuid_test.cc (right): https://codereview.chromium.org/1004913004/diff/20001/util/misc/uuid_test.cc#newcode234 util/misc/uuid_test.cc:234: EXPECT_EQ(system_string_utf8, uuid.ToString()); maybe just system_string == uuid.ToString16()? Or ...
5 years, 9 months ago (2015-03-13 16:52:32 UTC) #3
Mark Mentovai
That works, still needs reinterpret_cast<>. Updated.
5 years, 9 months ago (2015-03-13 17:00:16 UTC) #4
scottmg
still lgtm
5 years, 9 months ago (2015-03-13 17:41:22 UTC) #5
Mark Mentovai
5 years, 9 months ago (2015-03-13 17:53:42 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
e7b80a52f5b9832814485b58f66d4b13117a5186 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698