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

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

Created:
4 years ago by Noel Gordon
Modified:
3 years, 12 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 to mojo Define interface chrome::mojom::FilePatcher for out-of-process file patching. Add that interface to the utility process, and expose the interface 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(). Add a in-process browser test 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 matches the golden output file. Delete all the IPC related to out-of-process file patching since we no longer use them, we use chrome::mojom::FilePatcher instead. [1] chrome_content_utility_manifest_overlay.json TBR=waffles@chromium.org BUG=597124, 660325 Committed: https://crrev.com/32afc44b332255130c247e3bfc4a27261d11ddfb Cr-Commit-Position: refs/heads/master@{#440601}

Patch Set 1 #

Patch Set 2 : Try fix compile complaints re: ReleaseProcessIfNeeded() unused. #

Patch Set 3 : Try fix compile complaints re: Send() unused. #

Patch Set 4 : Make those two helpers class members instead. #

Patch Set 5 : Add test, expose this new mojo api to the browser (utility_overlay.json) #

Patch Set 6 : Moar robust browser test. #

Patch Set 7 : Try avoid ThreadRestrictions during browser test copy operations. #

Patch Set 8 : Add missing test/data files dependency for the browser test. #

Patch Set 9 : Use PostTaskAndReply to fix browser test assert failure. #

Patch Set 10 : #ifdef Send(), ReleaseProcessIfNeeded() helpers. #

Patch Set 11 : Chrome-os compile failure, munge the #ifdef so more. #

Patch Set 12 : WooHoo! now clean up, fix comment precision. #

Patch Set 13 : Minor include-what-you-use addition. #

Patch Set 14 : Fix linux_chromium_chromeos_ozone_rel_ng apply patch failure. #

Total comments: 36

Patch Set 15 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -155 lines) Patch
M chrome/browser/chrome_content_utility_manifest_overlay.json View 1 2 3 4 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 4 5 6 7 8 9 10 11 12 13 14 3 chunks +13 lines, -5 lines 0 comments Download
M chrome/browser/component_updater/component_patcher_operation_out_of_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +43 lines, -103 lines 0 comments Download
A chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +143 lines, -0 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 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 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +38 lines, -28 lines 0 comments Download

Messages

Total messages: 135 (119 generated)
Noel Gordon
Right green bots finally. The out-of-process patcher did not have tests per https://codereview.chromium.org/2597513003 so added ...
4 years ago (2016-12-21 15:05:35 UTC) #102
Noel Gordon
+ Johan for mojo as well. PTAL.
4 years ago (2016-12-22 02:19:36 UTC) #104
Sam McNally
https://codereview.chromium.org/2566053002/diff/400001/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/2566053002/diff/400001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc#newcode18 chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:18: #include "courgette/courgette.h" I think these can go. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc#newcode35 chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:35: ...
4 years ago (2016-12-22 02:45:49 UTC) #105
tibell
https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_patcher.mojom File chrome/common/file_patcher.mojom (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_patcher.mojom#newcode15 chrome/common/file_patcher.mojom:15: // Returns |result| bsdiff::OK on success. Nit: perhaps worth ...
4 years ago (2016-12-22 02:59:39 UTC) #106
Noel Gordon
On 2016/12/22 02:59:39, tibell wrote: > https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_patcher.mojom > File chrome/common/file_patcher.mojom (right): > > https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_patcher.mojom#newcode15 > ...
4 years ago (2016-12-22 04:38:24 UTC) #107
tibell
lgtm
4 years ago (2016-12-22 05:02:33 UTC) #108
Noel Gordon
New patch uploaded. https://codereview.chromium.org/2566053002/diff/400001/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/2566053002/diff/400001/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc#newcode18 chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:18: #include "courgette/courgette.h" On 2016/12/22 02:45:48, Sam ...
4 years ago (2016-12-22 05:06:34 UTC) #109
Sam McNally
lgtm https://codereview.chromium.org/2566053002/diff/400001/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/2566053002/diff/400001/chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc#newcode21 chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:21: #include "courgette/courgette.h" On 2016/12/22 05:06:33, noel gordon wrote: ...
4 years ago (2016-12-22 05:12:48 UTC) #112
Noel Gordon
On 2016/12/22 05:12:48, Sam McNally wrote: > They're still there. Oh yes, sorry. Forgot to ...
4 years ago (2016-12-22 05:23:01 UTC) #113
dcheng
mojo lgtm
4 years ago (2016-12-22 07:44:42 UTC) #116
jochen (gone - plz use gerrit)
lgtm
4 years ago (2016-12-22 16:00:48 UTC) #117
Noel Gordon
TBR=waffles@chromium.org for content_updater, but OOO at the moment.
3 years, 12 months ago (2016-12-23 07:27:11 UTC) #122
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/2566053002/420001
3 years, 12 months ago (2016-12-23 07:27:58 UTC) #126
commit-bot: I haz the power
Committed patchset #15 (id:420001)
3 years, 12 months ago (2016-12-23 08:29:24 UTC) #132
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/32afc44b332255130c247e3bfc4a27261d11ddfb Cr-Commit-Position: refs/heads/master@{#440601}
3 years, 12 months ago (2016-12-23 08:32:04 UTC) #134
Will Harris
3 years, 12 months ago (2016-12-25 20:25:08 UTC) #135
Message was sent while issue was closed.
A revert of this CL (patchset #15 id:420001) has been created in
https://codereview.chromium.org/2599393002/ by wfh@chromium.org.

The reason for reverting is: broke component updater - see crbug.com/676960.

Powered by Google App Engine
This is Rietveld 408576698