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

Issue 1689012: Move common code into process_util.cc (Closed)

Created:
10 years, 8 months ago by M-A Ruel
Modified:
9 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews
Visibility:
Public.

Description

Move common code into process_util.cc. Fix namespace usage. Change ProcessEntry to have a common interface accross platforms and change ProcessFilter::Includes() to make use of it. Split NamedProcessIterator in two. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=45953

Patch Set 1 #

Total comments: 15

Patch Set 2 : Review comments #

Patch Set 3 : fixews #

Total comments: 4

Patch Set 4 : Review changes #

Patch Set 5 : alignment #

Patch Set 6 : More fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -296 lines) Patch
M base/base.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M base/process.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M base/process_util.h View 1 2 3 4 5 11 chunks +54 lines, -23 lines 0 comments Download
A base/process_util.cc View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
M base/process_util_linux.cc View 1 2 3 4 chunks +28 lines, -30 lines 0 comments Download
M base/process_util_mac.mm View 1 2 3 5 chunks +38 lines, -46 lines 0 comments Download
M base/process_util_posix.cc View 3 chunks +0 lines, -54 lines 0 comments Download
M base/process_util_unittest.cc View 26 chunks +69 lines, -59 lines 0 comments Download
M base/process_util_win.cc View 1 2 3 4 4 chunks +13 lines, -51 lines 0 comments Download
M base/shared_memory.h View 1 6 chunks +10 lines, -11 lines 0 comments Download
M chrome/browser/memory_details_mac.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/memory_details_win.cc View 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/process_singleton_win_uitest.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/test/chrome_process_util.cc View 1 2 3 4 5 4 chunks +5 lines, -9 lines 0 comments Download
M chrome_frame/test_utils.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
M-A Ruel
http://codereview.chromium.org/1689012/diff/1/7 File base/process_util_mac.mm (right): http://codereview.chromium.org/1689012/diff/1/7#newcode76 base/process_util_mac.mm:76: num_of_kinfo_proc += 16; I thought 4 was a bit ...
10 years, 8 months ago (2010-04-23 17:24:14 UTC) #1
wtc
http://codereview.chromium.org/1689012/diff/1/3 File base/process.h (right): http://codereview.chromium.org/1689012/diff/1/3#newcode31 base/process.h:31: #endif // defined(OS_POSIX) Nit: this should be defined(OS_WIN) to ...
10 years, 8 months ago (2010-04-23 20:58:35 UTC) #2
M-A Ruel
Every other changes done. http://codereview.chromium.org/1689012/diff/1/9 File base/process_util_unittest.cc (right): http://codereview.chromium.org/1689012/diff/1/9#newcode40 base/process_util_unittest.cc:40: const wchar_t* const kProcessName = ...
10 years, 8 months ago (2010-04-27 17:45:58 UTC) #3
wtc
LGTM. Please commit the CL after making my suggested changes below. Don't need to wait ...
10 years, 8 months ago (2010-04-27 18:30:07 UTC) #4
M-A Ruel
10 years, 7 months ago (2010-04-29 17:34:24 UTC) #5
FYI,

http://codereview.chromium.org/1689012/diff/1/9
File base/process_util_unittest.cc (right):

http://codereview.chromium.org/1689012/diff/1/9#newcode40
base/process_util_unittest.cc:40: const wchar_t* const kProcessName =
L"base_unittests.exe";
On 2010/04/27 18:30:07, wtc wrote:
> I see.  This is not obvious at all.  Is this a fundamental
> limitation that future compilers won't be able to overcome?

It's the definition of the language, you specifically request for an array
otherwise.

http://codereview.chromium.org/1689012/diff/14001/15004
File base/process_util.h (right):

http://codereview.chromium.org/1689012/diff/14001/15004#newcode50
base/process_util.h:50: ProcessId get_pid() const { return th32ProcessID; }
On 2010/04/27 18:30:07, wtc wrote:
> The ProcessEntry structure doesn't have a 'gid' member on
> Windows.  Is that OK?

This concept doesn't exist on Windows.

Powered by Google App Engine
This is Rietveld 408576698