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

Issue 2473783005: [Win] Create ModuleWatcher. (Closed)

Created:
4 years, 1 month ago by chrisha
Modified:
4 years ago
CC:
chromium-reviews, grt (UTC plus 2)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Win] Create ModuleWatcher. This is a utility class that will be instantiated in each process type. The resulting events will be funneled back to the browser process for use in third-party metrics gathering and the chrome://conflicts UI. BUG=662084 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Committed: https://crrev.com/9d5f46c81db254725e6b8215937097a88b2f558c Cr-Commit-Position: refs/heads/master@{#434251}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Address pmonette's comments. #

Total comments: 10

Patch Set 3 : Refactor threading and observer model. #

Total comments: 49

Patch Set 4 : Address grt's review. #

Patch Set 5 : Small cleanup. #

Total comments: 46

Patch Set 6 : Addressed grt's comments. #

Patch Set 7 : Small cleanup. #

Total comments: 14

Patch Set 8 : Address grt's nits. #

Total comments: 15

Patch Set 9 : Rebased. #

Patch Set 10 : Address wfh@ nit. #

Patch Set 11 : Remove errant line post rebase. #

Patch Set 12 : Fix unittest. #

Patch Set 13 : Add conflits_dll for testing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+521 lines, -0 lines) Patch
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -0 lines 0 comments Download
A chrome/common/conflicts/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/common/conflicts/module_database_win.mojom View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/common/conflicts/module_event_win.mojom View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/common/conflicts/module_watcher_win.h View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A chrome/common/conflicts/module_watcher_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +232 lines, -0 lines 0 comments Download
A chrome/common/conflicts/module_watcher_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +119 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -0 lines 0 comments Download
A chrome/test/conflicts/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/test/conflicts/conflicts_dll.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 68 (27 generated)
chrisha
PTAL?
4 years, 1 month ago (2016-11-03 19:06:36 UTC) #2
Patrick Monette
https://codereview.chromium.org/2473783005/diff/1/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/1/chrome/common/conflicts/module_watcher_win.cc#newcode17 chrome/common/conflicts/module_watcher_win.cc:17: namespace { Usually, the unnamed namespace is put inside ...
4 years, 1 month ago (2016-11-03 20:18:15 UTC) #3
chrisha
Thanks pmonette. Another look? sky: Just looking for OWNER approval to carve out a new ...
4 years, 1 month ago (2016-11-04 15:32:42 UTC) #4
sky
On Fri, Nov 4, 2016 at 8:32 AM, <chrisha@chromium.org> wrote: > Thanks pmonette. Another look? ...
4 years, 1 month ago (2016-11-04 16:10:21 UTC) #5
sky
I got part way through and realized I can't fully review this until I understand ...
4 years, 1 month ago (2016-11-04 16:27:24 UTC) #6
chrisha
https://codereview.chromium.org/2473783005/diff/20001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/20001/chrome/common/conflicts/module_watcher_win.cc#newcode35 chrome/common/conflicts/module_watcher_win.cc:35: typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA { On 2016/11/04 16:27:24, sky wrote: ...
4 years, 1 month ago (2016-11-04 19:15:49 UTC) #7
chrisha
Okay... thought this through a bit more and chatted with gab@. I've added a "Threading ...
4 years, 1 month ago (2016-11-04 20:28:31 UTC) #8
sky
My inclination would be to only only support notifying on the thread that creates ModuleWatcher. ...
4 years, 1 month ago (2016-11-04 22:41:33 UTC) #9
chrisha
> My inclination would be to only only support notifying on the thread > that ...
4 years, 1 month ago (2016-11-07 18:19:55 UTC) #11
sky
I like the simplification. One question though. If the callback can occur on any thread, ...
4 years, 1 month ago (2016-11-07 21:08:52 UTC) #12
grt (UTC plus 2)
drive-by https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc#newcode8 chrome/common/conflicts/module_watcher_win.cc:8: #include <windows.h> nit: windows.h often needs to be ...
4 years, 1 month ago (2016-11-08 14:07:53 UTC) #14
chrisha
On 2016/11/07 21:08:52, sky wrote: > I like the simplification. One question though. If the ...
4 years, 1 month ago (2016-11-08 16:37:19 UTC) #16
chrisha
Another look grt? https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc#newcode8 chrome/common/conflicts/module_watcher_win.cc:8: #include <windows.h> On 2016/11/08 14:07:52, grt ...
4 years, 1 month ago (2016-11-08 21:45:22 UTC) #17
grt (UTC plus 2)
https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc#newcode124 chrome/common/conflicts/module_watcher_win.cc:124: ModuleWatcher* module_watcher = reinterpret_cast<ModuleWatcher*>(context); On 2016/11/08 21:45:21, chrisha (slow) ...
4 years, 1 month ago (2016-11-09 08:37:52 UTC) #18
chrisha
https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc#newcode124 chrome/common/conflicts/module_watcher_win.cc:124: ModuleWatcher* module_watcher = reinterpret_cast<ModuleWatcher*>(context); On 2016/11/09 08:37:52, grt (UTC ...
4 years, 1 month ago (2016-11-09 15:38:08 UTC) #19
grt (UTC plus 2)
looks good https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/40001/chrome/common/conflicts/module_watcher_win.cc#newcode124 chrome/common/conflicts/module_watcher_win.cc:124: ModuleWatcher* module_watcher = reinterpret_cast<ModuleWatcher*>(context); On 2016/11/09 15:38:07, ...
4 years, 1 month ago (2016-11-10 08:52:13 UTC) #20
chrisha
Thanks for the detailed review, grt. Another look? https://codereview.chromium.org/2473783005/diff/80001/chrome/common/conflicts/module_event_win.mojom File chrome/common/conflicts/module_event_win.mojom (right): https://codereview.chromium.org/2473783005/diff/80001/chrome/common/conflicts/module_event_win.mojom#newcode23 chrome/common/conflicts/module_event_win.mojom:23: // ...
4 years, 1 month ago (2016-11-14 16:06:45 UTC) #21
grt (UTC plus 2)
lgtm with nits https://codereview.chromium.org/2473783005/diff/80001/chrome/common/conflicts/module_watcher_win_unittest.cc File chrome/common/conflicts/module_watcher_win_unittest.cc (right): https://codereview.chromium.org/2473783005/diff/80001/chrome/common/conflicts/module_watcher_win_unittest.cc#newcode92 chrome/common/conflicts/module_watcher_win_unittest.cc:92: EXPECT_LT(0u, module_event_count_); On 2016/11/14 16:06:45, chrisha ...
4 years, 1 month ago (2016-11-14 20:30:31 UTC) #22
chrisha
Thanks grt. sky: care to take a look as owner? wfh: care to look at ...
4 years, 1 month ago (2016-11-14 21:38:40 UTC) #24
sky
LGTM https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc#newcode87 chrome/common/conflicts/module_watcher_win.cc:87: base::LazyInstance<base::Lock>::Leaky g_module_watcher_lock = These aren't global, so you ...
4 years, 1 month ago (2016-11-14 22:14:16 UTC) #25
Will Harris
have you tested that the APIs you're using work within the Chrome sandbox? Is it ...
4 years, 1 month ago (2016-11-14 22:17:17 UTC) #26
grt (UTC plus 2)
https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc#newcode87 chrome/common/conflicts/module_watcher_win.cc:87: base::LazyInstance<base::Lock>::Leaky g_module_watcher_lock = On 2016/11/14 22:14:16, sky wrote: > ...
4 years, 1 month ago (2016-11-15 10:35:34 UTC) #27
sky
I'm LGTMing as is. The discussion of whether 'g_' should be used here can be ...
4 years, 1 month ago (2016-11-15 14:15:37 UTC) #28
chrisha
On 2016/11/14 22:17:17, Will Harris wrote: > have you tested that the APIs you're using ...
4 years, 1 month ago (2016-11-15 19:41:08 UTC) #30
Will Harris
https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc#newcode176 chrome/common/conflicts/module_watcher_win.cc:176: MODULEENTRY32 module = {sizeof(module)}; module.dwSize = sizeof(module_entry) before calling ...
4 years, 1 month ago (2016-11-17 18:12:36 UTC) #35
Will Harris
fwiw looking over this again, my gut tells me there should be some kind of ...
4 years, 1 month ago (2016-11-17 18:19:10 UTC) #36
chrisha
On 2016/11/17 18:19:10, Will Harris wrote: > fwiw looking over this again, my gut tells ...
4 years, 1 month ago (2016-11-17 21:40:31 UTC) #37
Will Harris
lgtm % a question for my own education https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc#newcode176 chrome/common/conflicts/module_watcher_win.cc:176: MODULEENTRY32 ...
4 years, 1 month ago (2016-11-18 02:46:03 UTC) #38
grt (UTC plus 2)
https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc#newcode207 chrome/common/conflicts/module_watcher_win.cc:207: if (callback.is_null()) On 2016/11/18 02:46:03, Will Harris wrote: > ...
4 years, 1 month ago (2016-11-18 11:45:54 UTC) #39
chrisha
Thanks all, committing. https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc File chrome/common/conflicts/module_watcher_win.cc (right): https://codereview.chromium.org/2473783005/diff/140001/chrome/common/conflicts/module_watcher_win.cc#newcode207 chrome/common/conflicts/module_watcher_win.cc:207: if (callback.is_null()) On 2016/11/18 02:46:03, Will ...
4 years ago (2016-11-21 16:34:47 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2473783005/200001
4 years ago (2016-11-21 16:35:36 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/276915) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-11-21 16:45:19 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2473783005/220001
4 years ago (2016-11-21 18:48:10 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/321329)
4 years ago (2016-11-21 19:38:24 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2473783005/240001
4 years ago (2016-11-21 22:00:09 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/321509)
4 years ago (2016-11-21 23:48:01 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2473783005/260001
4 years ago (2016-11-23 14:18:35 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/343411)
4 years ago (2016-11-23 15:51:26 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2473783005/260001
4 years ago (2016-11-23 18:26:16 UTC) #63
commit-bot: I haz the power
Committed patchset #13 (id:260001)
4 years ago (2016-11-23 21:24:58 UTC) #66
commit-bot: I haz the power
4 years ago (2016-11-23 21:28:01 UTC) #68
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/9d5f46c81db254725e6b8215937097a88b2f558c
Cr-Commit-Position: refs/heads/master@{#434251}

Powered by Google App Engine
This is Rietveld 408576698