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

Issue 2632143002: Convert utility process out-of-process file patching IPC to mojo (Closed)

Created:
3 years, 11 months ago by Noel Gordon
Modified:
3 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert utility process out-of-process file patching IPC to mojo Define interface chrome::mojom::FilePatcher for out-of-process file patching. Add the interface to the utility process and expose it to to the browser process by mojo policy [1]. ChromeOutOfProcessPatcher: remove PatchHost() helper class, replace it with a content::UtilityProcessMojoClient() and use that to start and stop the utility process needed for out-of-process file patches and to perform out-of-process file patches using mojo calls, rather than IPC::Send(). Move the mojo calls to the IO thread to avoid bug 676960 (mojo does not work from the blocking pool). Add an in-process browsertest for the ChromeOutOfProcessPatcher (it had no tests http://bit.ly/2h8mafX it seems). Copy the golden files to random locations (input_file, patch_file) and patch them: checks the patched output_file content matches the golden output file. Add tests for invalid file inputs to the file patcher. Note all work in the tests originates from the blocking pool: bug 676960. [1] chrome_content_utility_manifest_overlay.json BUG=597124 Review-Url: https://codereview.chromium.org/2632143002 Cr-Commit-Position: refs/heads/master@{#445324} Committed: https://chromium.googlesource.com/chromium/src/+/bfee08c642470b8a7d39988d718af6584f567adc

Patch Set 1 #

Patch Set 2 : Move all Patch() work onto the FILE thread. #

Patch Set 3 : Or move just the mojo work to the IO thread. #

Total comments: 3

Patch Set 4 : Use kCourgette in the invalid file tests. #

Total comments: 4

Patch Set 5 : Final review comments. #

Patch Set 6 : Reupload to sync to tip. Try landing again. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -157 lines) Patch
M chrome/browser/chrome_content_utility_manifest_overlay.json View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/component_updater/component_patcher_operation_out_of_process.h View 1 2 3 2 chunks +22 lines, -8 lines 0 comments Download
M chrome/browser/component_updater/component_patcher_operation_out_of_process.cc View 1 2 1 chunk +62 lines, -102 lines 0 comments Download
A chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc View 1 2 3 4 1 chunk +191 lines, -0 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_utility_messages.h View 2 chunks +0 lines, -19 lines 0 comments Download
A chrome/common/file_patcher.mojom View 1 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 1 2 3 6 chunks +37 lines, -28 lines 0 comments Download

Messages

Total messages: 74 (55 generated)
Noel Gordon
https://chromium.googlesource.com/chromium/src.git/+/32afc44b332255130c247e3bfc4a27261d11ddfb reland attempt. The patch was reverted in bug 676960 because it broke the component ...
3 years, 11 months ago (2017-01-17 00:09:48 UTC) #31
Sam McNally
lgtm
3 years, 11 months ago (2017-01-18 07:19:14 UTC) #32
Noel Gordon
+waffles for the out-of-process patching. and in particular, please check the browser test now matches ...
3 years, 11 months ago (2017-01-18 12:50:03 UTC) #34
waffles
Thanks for adding the browser test! https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc File chrome/browser/component_updater/component_patcher_operation_out_of_process.cc (right): https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc#newcode92 chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:92: task_runner_->PostTask(FROM_HERE, base::Bind(callback_, result)); ...
3 years, 11 months ago (2017-01-18 20:34:04 UTC) #35
dcheng
Is PS1 the original patch? I'm hoping to just diff the updates ;-)
3 years, 11 months ago (2017-01-18 23:05:00 UTC) #36
tibell
lgtm Nice test!
3 years, 11 months ago (2017-01-18 23:50:19 UTC) #37
Noel Gordon
https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc File chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc (right): https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc#newcode167 chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:167: RunPatchTest(update_client::kBsdiff, invalid, patch_file, output_file, Since the patch file is ...
3 years, 11 months ago (2017-01-19 13:25:29 UTC) #38
Noel Gordon
On 2017/01/18 23:05:00, dcheng wrote: > Is PS1 the original patch? I'm hoping to just ...
3 years, 11 months ago (2017-01-19 13:58:27 UTC) #42
Noel Gordon
Good questions: https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc File chrome/browser/component_updater/component_patcher_operation_out_of_process.cc (right): https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc#newcode92 chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:92: task_runner_->PostTask(FROM_HERE, base::Bind(callback_, result)); On 2017/01/18 20:34:03, waffles ...
3 years, 11 months ago (2017-01-19 15:55:20 UTC) #46
waffles
On 2017/01/19 15:55:20, noel gordon wrote: > Good questions: > > https://codereview.chromium.org/2632143002/diff/100001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc > File > ...
3 years, 11 months ago (2017-01-19 17:32:01 UTC) #52
dcheng
mojo lgtm https://codereview.chromium.org/2632143002/diff/160001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc File chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc (right): https://codereview.chromium.org/2632143002/diff/160001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc#newcode31 chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:31: static base::FilePath test_file(const char* name) { Nit: ...
3 years, 11 months ago (2017-01-20 08:07:14 UTC) #53
Noel Gordon
https://codereview.chromium.org/2632143002/diff/160001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc File chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc (right): https://codereview.chromium.org/2632143002/diff/160001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc#newcode31 chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:31: static base::FilePath test_file(const char* name) { On 2017/01/20 08:07:14, ...
3 years, 11 months ago (2017-01-20 09:46:25 UTC) #56
Noel Gordon
On 2017/01/20 09:46:25, noel gordon wrote: > :) Fascinating etymology. I do prefer the French ...
3 years, 11 months ago (2017-01-20 09:52:09 UTC) #58
jochen (gone - plz use gerrit)
lgtm
3 years, 11 months ago (2017-01-20 13:07:52 UTC) #61
Noel Gordon
On 2017/01/20 13:07:52, jochen wrote: > lgtm Right folks thanks. Let's land and watch chrome ...
3 years, 11 months ago (2017-01-23 00:53:37 UTC) #62
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/2632143002/180001
3 years, 11 months ago (2017-01-23 00:54:02 UTC) #65
commit-bot: I haz the power
Failed to apply patch for chrome/common/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 11 months ago (2017-01-23 02:47:22 UTC) #67
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/2632143002/200001
3 years, 11 months ago (2017-01-23 04:08:16 UTC) #71
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 05:03:29 UTC) #74
Message was sent while issue was closed.
Committed patchset #6 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/bfee08c642470b8a7d39988d718a...

Powered by Google App Engine
This is Rietveld 408576698