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

Issue 727973002: Move some parts of ProcessReader (in snapshot) to ProcessInfo (in util) (Closed)

Created:
6 years, 1 month ago by Mark Mentovai
Modified:
6 years, 1 month ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Project:
crashpad
Visibility:
Public.

Description

Move some parts of ProcessReader (in snapshot) to ProcessInfo (in util). Also, move ProcessArgumentsForPID() into ProcessInfo. This change prepares for a TaskForPID() implementation that’s capable of operating correctly in a setuid root executable. TaskForPID() belongs in util/mach, but for its permission checks, it must access some process properties that were previously fetched by ProcessReader in snapshot. util can’t depend on snapshot. The generic util-safe process information bits (Is64Bit(), ProcessID(), ParentProcessID(), and StartTime()) are moved from ProcessReader to ProcessInfo (in util), where the current ProcessReader can use it (as it’s OK for snapshot to depend on util), and the future TaskForPID() in util can also use it. ProcessInfo also contains other methods that TaskForPID() will use, providing access to the credentials that the target process holds. ProcessArgumentsForPID() is related, and is also now a part of ProcessInfo. TEST=snapshot_test, util_test R=rsesek@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/6812cec67e116d9357fbefaa08af82093dce1d5d

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+561 lines, -229 lines) Patch
M snapshot/mac/process_reader.h View 5 chunks +14 lines, -7 lines 0 comments Download
M snapshot/mac/process_reader.cc View 3 chunks +3 lines, -20 lines 0 comments Download
M util/mac/service_management_test.mm View 3 chunks +8 lines, -4 lines 0 comments Download
A util/posix/process_info.h View 1 1 chunk +152 lines, -0 lines 0 comments Download
A util/posix/process_info_mac.cc View 1 1 chunk +233 lines, -0 lines 0 comments Download
A util/posix/process_info_test.cc View 1 1 chunk +148 lines, -0 lines 0 comments Download
D util/posix/process_util.h View 1 chunk +0 lines, -42 lines 0 comments Download
D util/posix/process_util_mac.cc View 1 chunk +0 lines, -103 lines 0 comments Download
D util/posix/process_util_test.cc View 1 chunk +0 lines, -50 lines 0 comments Download
M util/util.gyp View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Mark Mentovai
6 years, 1 month ago (2014-11-14 21:51:47 UTC) #2
Robert Sesek
https://codereview.chromium.org/727973002/diff/1/util/posix/process_info.h File util/posix/process_info.h (right): https://codereview.chromium.org/727973002/diff/1/util/posix/process_info.h#newcode40 util/posix/process_info.h:40: No dtor? https://codereview.chromium.org/727973002/diff/1/util/posix/process_info.h#newcode48 util/posix/process_info.h:48: //! returns is loaded at ...
6 years, 1 month ago (2014-11-14 22:06:19 UTC) #3
Mark Mentovai
Updated. https://codereview.chromium.org/727973002/diff/1/util/posix/process_info.h File util/posix/process_info.h (right): https://codereview.chromium.org/727973002/diff/1/util/posix/process_info.h#newcode48 util/posix/process_info.h:48: //! returns is loaded at the time Initialize() ...
6 years, 1 month ago (2014-11-14 22:16:46 UTC) #4
Robert Sesek
LGTM
6 years, 1 month ago (2014-11-14 22:51:53 UTC) #5
Mark Mentovai
6 years, 1 month ago (2014-11-14 22:54:46 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
6812cec67e116d9357fbefaa08af82093dce1d5d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698