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

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed)

Created:
4 years, 11 months ago by afakhry
Modified:
4 years, 9 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrate ProcessesEventRouter to the new task manager This CL migrates the dependency of the ProcessesAPIs to the new task manager implementation. The API of the process info has been fixed, since processes don't have titles, instead we added a list of tasks running in that process, with their titles and optional tab IDs. BUG=525201, 591581 TEST=browser_tests --gtest_filter=ProcessesApiTest.* Committed: https://crrev.com/98241839b528f945fabb03f38fb1ea6a3e837f09 Cr-Commit-Position: refs/heads/master@{#380696}

Patch Set 1 #

Patch Set 2 : [WIP]: Added idl file, implemented functions, still needs work. #

Patch Set 3 : [WIP] getting closer. #

Patch Set 4 : [WIP] still need to figure out how to cleanly implement onUnresponsive #

Patch Set 5 : [WIP]: fix apitests and we're done. #

Patch Set 6 : [WIP] Fixes and clean ups ... tests still fail. #

Patch Set 7 : [WIP] Better approach. #

Patch Set 8 : [NOT a WIP] All tests are passing. #

Total comments: 10

Patch Set 9 : Fix gn builds and nick's initial comments #

Patch Set 10 : dispatch onCreated and onExited only for processes with valid child process host IDs #

Total comments: 12

Patch Set 11 : nick's comments 2, and re-enable testOnExited(). #

Patch Set 12 : rearrange some code to make it easier to review. #

Total comments: 34

Patch Set 13 : Nick's comments [- implement a way to tell observers background calculations are ready] #

Patch Set 14 : Observers can be notified when background resource calculations are complete for all currentlty ava… #

Patch Set 15 : Fix test.js; browser process is expected. #

Patch Set 16 : Nope, browser process is not expected in onCreate(). #

Total comments: 7

Patch Set 17 : Fix edge case in detecting background calculations completion #

Total comments: 1

Patch Set 18 : Rebase ... #

Total comments: 34

Patch Set 19 : Devlin's comments #

Total comments: 16

Patch Set 20 : Almost there. #

Patch Set 21 : missed comment. #

Patch Set 22 : Fix duplicate entry in schemas.gypi #

Total comments: 2

Patch Set 23 : Fix nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+941 lines, -706 lines) Patch
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/processes/processes_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +77 lines, -92 lines 0 comments Download
M chrome/browser/extensions/api/processes/processes_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +426 lines, -496 lines 0 comments Download
M chrome/browser/extensions/api/processes/processes_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +46 lines, -29 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/task_management/providers/arc/arc_process_task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/task_management/providers/task.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/task_management/providers/task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/task_management/providers/task_provider.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/task_management/providers/task_provider.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/task_management/providers/task_provider_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/task_management/providers/web_contents/renderer_task.h View 1 2 3 4 5 6 7 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/task_management/providers/web_contents/renderer_task.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +40 lines, -3 lines 0 comments Download
M chrome/browser/task_management/sampling/task_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +48 lines, -1 line 0 comments Download
M chrome/browser/task_management/task_manager_interface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +31 lines, -1 line 0 comments Download
M chrome/browser/task_management/task_manager_interface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/task_management/task_manager_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/task_management/task_manager_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/task_management/test_task_manager.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/task_management/test_task_manager.cc View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +9 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/processes.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +13 lines, -6 lines 0 comments Download
M chrome/common/extensions/api/schemas.gni View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/schemas.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +9 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/processes/api/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +14 lines, -8 lines 0 comments Download
A chrome/test/data/extensions/api_test/processes/onupdated_with_memory/background.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +11 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/processes/onupdated_with_memory/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +7 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/web_contents_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -0 lines 0 comments Download
D extensions/browser/extension_function_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -24 lines 0 comments Download
D extensions/browser/extension_function_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -32 lines 0 comments Download
M extensions/extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 56 (21 generated)
afakhry
Nick and Charlie, Please take a look at this CL which migrates ProcessesAPIs to the ...
4 years, 10 months ago (2016-02-02 02:44:27 UTC) #3
ncarter (slow)
I'll need a little more time to do an in-depth review here, but I skimmed ...
4 years, 10 months ago (2016-02-02 22:16:53 UTC) #4
afakhry
https://codereview.chromium.org/1584473004/diff/140001/chrome/browser/extensions/api/processes/processes_api.h File chrome/browser/extensions/api/processes/processes_api.h (right): https://codereview.chromium.org/1584473004/diff/140001/chrome/browser/extensions/api/processes/processes_api.h#newcode15 chrome/browser/extensions/api/processes/processes_api.h:15: class ProccessApiTest; On 2016/02/02 22:16:53, ncarter wrote: > Proccess ...
4 years, 10 months ago (2016-02-05 19:51:15 UTC) #5
ncarter (slow)
I'm still working through this -- but publishing my comments now since the last one ...
4 years, 10 months ago (2016-02-08 22:37:09 UTC) #8
afakhry
The below table will help you understand the mapping between old and new code in ...
4 years, 10 months ago (2016-02-09 04:01:23 UTC) #10
afakhry
On 2016/02/09 04:01:23, afakhry wrote: > The below table will help you understand the mapping ...
4 years, 10 months ago (2016-02-09 04:07:10 UTC) #11
ncarter (slow)
https://codereview.chromium.org/1584473004/diff/240001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/240001/chrome/browser/extensions/api/processes/processes_api.cc#newcode181 chrome/browser/extensions/api/processes/processes_api.cc:181: } Given the need to conditionally unsubscribe in the ...
4 years, 10 months ago (2016-02-11 00:33:55 UTC) #12
ncarter (slow)
Overall: I think this is good. https://codereview.chromium.org/1584473004/diff/240001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (left): https://codereview.chromium.org/1584473004/diff/240001/chrome/browser/extensions/api/processes/processes_api.cc#oldcode698 chrome/browser/extensions/api/processes/processes_api.cc:698: EXTENSION_FUNCTION_VALIDATE(ReadOneOrMoreIntegers(processes, &process_ids_)); Looks ...
4 years, 10 months ago (2016-02-11 22:16:50 UTC) #13
afakhry
Nick, I handled your comments, as well as implemented a way to notify observers when ...
4 years, 10 months ago (2016-02-17 02:27:14 UTC) #16
ncarter (slow)
https://codereview.chromium.org/1584473004/diff/240001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/240001/chrome/browser/extensions/api/processes/processes_api.cc#newcode181 chrome/browser/extensions/api/processes/processes_api.cc:181: } On 2016/02/17 02:27:13, afakhry wrote: > On 2016/02/11 ...
4 years, 10 months ago (2016-02-17 21:21:20 UTC) #17
afakhry
PTAL https://codereview.chromium.org/1584473004/diff/320001/chrome/browser/task_management/sampling/task_group.cc File chrome/browser/task_management/sampling/task_group.cc (right): https://codereview.chromium.org/1584473004/diff/320001/chrome/browser/task_management/sampling/task_group.cc#newcode139 chrome/browser/task_management/sampling/task_group.cc:139: expected_on_bg_done_flags_ = refresh_flags & kBackgroundRefreshTypesMask; On 2016/02/17 21:21:19, ...
4 years, 10 months ago (2016-02-19 17:35:10 UTC) #18
ncarter (slow)
lgtm https://codereview.chromium.org/1584473004/diff/320001/chrome/browser/task_management/sampling/task_group.cc File chrome/browser/task_management/sampling/task_group.cc (right): https://codereview.chromium.org/1584473004/diff/320001/chrome/browser/task_management/sampling/task_group.cc#newcode139 chrome/browser/task_management/sampling/task_group.cc:139: expected_on_bg_done_flags_ = refresh_flags & kBackgroundRefreshTypesMask; On 2016/02/19 17:35:09, ...
4 years, 10 months ago (2016-02-19 18:19:03 UTC) #19
Charlie Reis
(I'm happy to defer to Nick's review here. Thanks!)
4 years, 10 months ago (2016-02-19 19:07:35 UTC) #20
afakhry
rdevlin.cronin@chromium.org: Could you please review the extensions related code.
4 years, 10 months ago (2016-02-19 19:24:58 UTC) #22
Devlin
On 2016/02/19 19:24:58, afakhry wrote: > mailto:rdevlin.cronin@chromium.org: Could you please review the extensions related > ...
4 years, 10 months ago (2016-02-19 22:32:52 UTC) #23
afakhry
Rebase has been done over the newly landed IDL migration CL. Devlin, please review. Thanks!
4 years, 9 months ago (2016-03-03 02:21:53 UTC) #26
Devlin
https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (left): https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc#oldcode61 chrome/browser/extensions/api/processes/processes_api.cc:61: scoped_ptr<api::processes::Cache> cache(new api::processes::Cache()); revert this change https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc ...
4 years, 9 months ago (2016-03-03 23:12:43 UTC) #27
afakhry
PTAL. Thanks! https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (left): https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc#oldcode61 chrome/browser/extensions/api/processes/processes_api.cc:61: scoped_ptr<api::processes::Cache> cache(new api::processes::Cache()); On 2016/03/03 23:12:43, Devlin ...
4 years, 9 months ago (2016-03-08 01:37:30 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1584473004/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1584473004/380001
4 years, 9 months ago (2016-03-08 02:45:48 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/192849)
4 years, 9 months ago (2016-03-08 02:53:23 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1584473004/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1584473004/380001
4 years, 9 months ago (2016-03-08 18:40:25 UTC) #35
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/193157)
4 years, 9 months ago (2016-03-08 18:46:54 UTC) #37
Devlin
Getting close! https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc#newcode178 chrome/browser/extensions/api/processes/processes_api.cc:178: base::TimeDelta::FromSeconds(1), On 2016/03/08 01:37:29, afakhry wrote: > ...
4 years, 9 months ago (2016-03-08 21:27:23 UTC) #38
afakhry
https://codereview.chromium.org/1584473004/diff/380001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/380001/chrome/browser/extensions/api/processes/processes_api.cc#newcode41 chrome/browser/extensions/api/processes/processes_api.cc:41: base::LazyInstance<BrowserContextKeyedAPIFactory<ProcessesAPI> > On 2016/03/08 21:27:22, Devlin wrote: > nit: ...
4 years, 9 months ago (2016-03-09 02:10:14 UTC) #39
Devlin
https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc#newcode178 chrome/browser/extensions/api/processes/processes_api.cc:178: base::TimeDelta::FromSeconds(1), On 2016/03/08 21:27:22, Devlin wrote: > On 2016/03/08 ...
4 years, 9 months ago (2016-03-09 15:16:12 UTC) #40
afakhry
https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc#newcode178 chrome/browser/extensions/api/processes/processes_api.cc:178: base::TimeDelta::FromSeconds(1), On 2016/03/09 15:16:12, Devlin wrote: > On 2016/03/08 ...
4 years, 9 months ago (2016-03-09 18:46:37 UTC) #41
afakhry
On 2016/03/09 18:46:37, afakhry wrote: > https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc > File chrome/browser/extensions/api/processes/processes_api.cc (right): > > https://codereview.chromium.org/1584473004/diff/360001/chrome/browser/extensions/api/processes/processes_api.cc#newcode178 > ...
4 years, 9 months ago (2016-03-10 18:56:53 UTC) #42
Devlin
lgtm!
4 years, 9 months ago (2016-03-10 19:02:39 UTC) #43
ncarter (slow)
still lgtm, one nit https://codereview.chromium.org/1584473004/diff/440001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/440001/chrome/browser/extensions/api/processes/processes_api.cc#newcode23 chrome/browser/extensions/api/processes/processes_api.cc:23: Weird newline here.
4 years, 9 months ago (2016-03-10 21:01:04 UTC) #44
afakhry
https://codereview.chromium.org/1584473004/diff/440001/chrome/browser/extensions/api/processes/processes_api.cc File chrome/browser/extensions/api/processes/processes_api.cc (right): https://codereview.chromium.org/1584473004/diff/440001/chrome/browser/extensions/api/processes/processes_api.cc#newcode23 chrome/browser/extensions/api/processes/processes_api.cc:23: On 2016/03/10 21:01:04, ncarter wrote: > Weird newline here. ...
4 years, 9 months ago (2016-03-11 03:38:11 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1584473004/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1584473004/460001
4 years, 9 months ago (2016-03-11 03:39:15 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/158364) win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, ...
4 years, 9 months ago (2016-03-11 03:48:39 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1584473004/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1584473004/460001
4 years, 9 months ago (2016-03-11 17:43:24 UTC) #52
commit-bot: I haz the power
Committed patchset #23 (id:460001)
4 years, 9 months ago (2016-03-11 19:27:58 UTC) #54
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 19:29:34 UTC) #56
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/98241839b528f945fabb03f38fb1ea6a3e837f09
Cr-Commit-Position: refs/heads/master@{#380696}

Powered by Google App Engine
This is Rietveld 408576698