|
|
Chromium Code Reviews|
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. |
DescriptionConvert 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. #Messages
Total messages: 135 (119 generated)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #3 (id:40001) has been deleted
Patchset #3 (id:60001) has been deleted
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Mojoify utility process IPC for file patching BUG= ========== to ========== Mojoify utility process IPC for file patching BUG=597124 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
Patchset #5 (id:120001) has been deleted
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #7 (id:180001) has been deleted
Dry run: 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_...)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
Patchset #7 (id:200001) has been deleted
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #11 (id:300001) has been deleted
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...)
Patchset #14 (id:380001) has been deleted
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
noel@chromium.org changed reviewers: + dcheng@chromium.org, jochen@chromium.org, sammc@chromium.org
Right green bots finally. The out-of-process patcher did not have tests per https://codereview.chromium.org/2597513003 so added one here. +jochen for OWNERS. +daniel for IPC sec review. +sam for the rest. PTAL.
noel@chromium.org changed reviewers: + tibell@chromium.org
+ Johan for mojo as well. PTAL.
https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... 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/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:35: task_runner_ = task_runner; DCHECK(!utility_process_mojo_client_) DCHECK(task_runner) https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:75: if (task_runner_.get()) { This shouldn't be necessary with utility_process_mojo_client_.reset() above. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process.h (left): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.h:8: #include <string> These are still needed. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.h:16: class FilePath; So are these. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process.h (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.h:20: // DeltaUpdateOpPatch::OutOfProcessPatcher::Patch() request. This comment should be something of the form update_client::OutOfProcessPatcher overrides or update_client::OutOfProcessPatcher implementation. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:8: #include "base/files/file.h" Remove. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:21: #include "courgette/courgette.h" Remove these. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:32: static base::FilePath test_file(const char* name) { Prefer passing these as base::StringPiece. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:73: void PatchTest(const std::string& operation, How about RunPatchTest? https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:107: base::ScopedTempDir installed_dir_; What do these names mean? Could this test use a single shared tempdir? https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:123: PatchTest("courgette", input_file, patch_file, output_file, kExpectedResult); Use the constants for the operation argument. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:139: } How about adding tests where opening input or output files fails? https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:69: FilePatcherImpl() {} = default; https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:70: ~FilePatcherImpl() override {} = default; https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:258: bool Send(IPC::Message* message) { These should remain in the anonymous namespace.
https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_pat... File chrome/common/file_patcher.mojom (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_pat... chrome/common/file_patcher.mojom:15: // Returns |result| bsdiff::OK on success. Nit: perhaps worth saying that |result| is a |bsdiff::BSDiffStatus|. https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_pat... chrome/common/file_patcher.mojom:27: mojo.common.mojom.File output_file) => (int32 result); Nit: perhaps worth saying that |result| is a |courgette::Status|. https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:78: void PatchFileBsdiff(base::File input_file, We usually add line // chrome::mojom::FilePatcher: before the overrides so it's clear where they're coming.
On 2016/12/22 02:59:39, tibell wrote: > https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_pat... > File chrome/common/file_patcher.mojom (right): > > https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_pat... > chrome/common/file_patcher.mojom:15: // Returns |result| bsdiff::OK on success. > Nit: perhaps worth saying that |result| is a |bsdiff::BSDiffStatus|. > > https://codereview.chromium.org/2566053002/diff/400001/chrome/common/file_pat... > chrome/common/file_patcher.mojom:27: mojo.common.mojom.File output_file) => > (int32 result); > Nit: perhaps worth saying that |result| is a |courgette::Status|. Done. > https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... > File chrome/utility/chrome_content_utility_client.cc (right): > > https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... > chrome/utility/chrome_content_utility_client.cc:78: void > PatchFileBsdiff(base::File input_file, > We usually add line Done. > // chrome::mojom::FilePatcher: > > before the overrides so it's clear where they're coming. Done.
lgtm
New patch uploaded. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:18: #include "courgette/courgette.h" On 2016/12/22 02:45:48, Sam McNally wrote: > I think these can go. Done. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:35: task_runner_ = task_runner; On 2016/12/22 02:45:48, Sam McNally wrote: > DCHECK(!utility_process_mojo_client_) > DCHECK(task_runner) Done. And moved all DCHECK to here. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.cc:75: if (task_runner_.get()) { On 2016/12/22 02:45:49, Sam McNally wrote: > This shouldn't be necessary with utility_process_mojo_client_.reset() above. Done. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process.h (left): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.h:8: #include <string> On 2016/12/22 02:45:49, Sam McNally wrote: > These are still needed. OK, let's do IWYU herein, and remove duplicate #include from the .cc file. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.h:16: class FilePath; On 2016/12/22 02:45:49, Sam McNally wrote: > So are these. Ditto. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process.h (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process.h:20: // DeltaUpdateOpPatch::OutOfProcessPatcher::Patch() request. On 2016/12/22 02:45:49, Sam McNally wrote: > This comment should be something of the form update_client::OutOfProcessPatcher > overrides or update_client::OutOfProcessPatcher implementation. // update_client::OutOfProcessPatcher done. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:8: #include "base/files/file.h" On 2016/12/22 02:45:49, Sam McNally wrote: > Remove. Kept. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:21: #include "courgette/courgette.h" On 2016/12/22 02:45:49, Sam McNally wrote: > Remove these. Yes, good spot, done. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:32: static base::FilePath test_file(const char* name) { On 2016/12/22 02:45:49, Sam McNally wrote: > Prefer passing these as base::StringPiece. This code came from the update_client unit tests. Hoping the folks over there will take ownership of the current test, so I'd like to retain the code they use. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:73: void PatchTest(const std::string& operation, On 2016/12/22 02:45:49, Sam McNally wrote: > How about RunPatchTest? Done. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:107: base::ScopedTempDir installed_dir_; On 2016/12/22 02:45:49, Sam McNally wrote: > What do these names mean? Could this test use a single shared tempdir? Great question (had the same question myself about meaning), /me guesses installed_dir_ -- chrome install directory. input_dir_ -- directory where the patch file was downloaded. output_dir_ -- directory where the patched result should be written. Still these dir_ names again come from the update_client unittests, so I just used their names to make things easier for them to take over this test. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:123: PatchTest("courgette", input_file, patch_file, output_file, kExpectedResult); On 2016/12/22 02:45:49, Sam McNally wrote: > Use the constants for the operation argument. Yes, done here and in CheckBsdiffOperation below. Used the constants defined for operations from namespace update_client:: Added a TODO re: adding a test with one of files that can't be opened. https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc:139: } On 2016/12/22 02:45:49, Sam McNally wrote: > How about adding tests where opening input or output files fails? Added a TODO about this. https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:69: FilePatcherImpl() {} On 2016/12/22 02:45:49, Sam McNally wrote: > = default; Done. https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:70: ~FilePatcherImpl() override {} On 2016/12/22 02:45:49, Sam McNally wrote: > = default; Done. https://codereview.chromium.org/2566053002/diff/400001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:258: bool Send(IPC::Message* message) { On 2016/12/22 02:45:49, Sam McNally wrote: > These should remain in the anonymous namespace. Done.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... File chrome/browser/component_updater/component_patcher_operation_out_of_process_browsertest.cc (right): https://codereview.chromium.org/2566053002/diff/400001/chrome/browser/compone... 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: > On 2016/12/22 02:45:49, Sam McNally wrote: > > Remove these. > > Yes, good spot, done. They're still there.
On 2016/12/22 05:12:48, Sam McNally wrote: > They're still there. Oh yes, sorry. Forgot to mention they do need to be there since they are used 119 const int kExpectedResult = courgette::C_OK; 133 const int kExpectedResult = bsdiff::OK; The browertest.cc won't compile without these includes, testing locally.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
mojo lgtm
lgtm
Description was changed from ========== Mojoify utility process IPC for file patching BUG=597124 ========== to ========== Mojoify utility process IPC for file patching BUG=597124, 660325 ==========
Description was changed from ========== Mojoify utility process IPC for file patching BUG=597124, 660325 ========== to ========== Convert utility process file patching to mojo. BUG=597124, 660325 ==========
Description was changed from ========== Convert utility process file patching to mojo. BUG=597124, 660325 ========== to ========== 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, output_file) and patch them: check the patch 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@chromim.org BUG=597124, 660325 ==========
Description was changed from ========== 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, output_file) and patch them: check the patch 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@chromim.org BUG=597124, 660325 ========== to ========== 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, output_file) and patch them: check the patch 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 ==========
TBR=waffles@chromium.org for content_updater, but OOO at the moment.
noel@chromium.org changed reviewers: + waffles@chromium.org
The CQ bit was checked by noel@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tibell@chromium.org Link to the patchset: https://codereview.chromium.org/2566053002/#ps420001 (title: "Address review comments.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== 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, output_file) and patch them: check the patch 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 ========== to ========== 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 ==========
Description was changed from ========== 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 ========== to ========== 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 ==========
noel@chromium.org changed reviewers: + sorin@chromium.org
CQ is committing da patch.
Bot data: {"patchset_id": 420001, "attempt_start_ts": 1482478066074060,
"parent_rev": "b226c71fbd3c5d558caf79647e52f422eb262b27", "commit_rev":
"1dee1469542da77717fca39ffc3918fbc51ce448"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 Review-Url: https://codereview.chromium.org/2566053002 ==========
Message was sent while issue was closed.
Committed patchset #15 (id:420001)
Message was sent while issue was closed.
Description was changed from ========== 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 Review-Url: https://codereview.chromium.org/2566053002 ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 15 (id:??) landed as https://crrev.com/32afc44b332255130c247e3bfc4a27261d11ddfb Cr-Commit-Position: refs/heads/master@{#440601}
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. |
