Mojo chrome/common/extensions/chrome_utility_extensions_messages.h |
|||||||
Issue descriptionThe IPC in chrome/common/extensions/chrome_utility_extensions_messages.h should be converted to mojo. Some are deprecated, so no sense trying to convert them [1], but the rest are candidates for mojo conversion. [1] see bug 542912 #19 -#21
,
Jan 13 2017
,
Jan 13 2017
,
Jan 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3b491f68e9be76a22f54208d6c1a3531eb4d8386 commit 3b491f68e9be76a22f54208d6c1a3531eb4d8386 Author: noel <noel@chromium.org> Date: Fri Jan 13 16:47:47 2017 Convert utility process ParseMediaMetadata IPC to mojo Convert IPC media parse messages ChromeUtilityMsg_ParseMediaMetadata and ChromeUtilityHostMsg_ParseMediaMetadata_Finished to mojo. Add media_parser.mojom, add StructTraits for metadata::AttachedImage and use mojo common traits for base::DictionaryValue metadata. Resolve a ChromeContentUtilityClient TODO: if the utility process is running with elevated privileges, we only add elevated Mojo services to the service_manager::InterfaceRegistry. Add ExtensionsHandler API ExtensionsHandler::ExposeInterfacesToBrowser, and again, only expose its elevated Mojo services if the process is running elevated. Manually tested using the MGA media gallery sample app [1]. There is a browser test MediaGalleriesPlatformAppBrowserTest.GetMetadata that runs on chrome mac. [1] http://bit.ly/2i8qPSN BUG= 680928 Review-Url: https://codereview.chromium.org/2615423002 Cr-Commit-Position: refs/heads/master@{#443579} [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/browser/chrome_content_utility_manifest_overlay.json [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.h [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/BUILD.gn [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/BUILD.gn [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/OWNERS [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/chrome_utility_extensions_messages.h [add] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/media_parser.mojom [add] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/media_parser.typemap [add] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/media_parser_struct_traits.cc [add] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/media_parser_struct_traits.h [add] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/common/extensions/typemaps.gni [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/utility/chrome_content_utility_client.cc [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/utility/extensions/extensions_handler.cc [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/chrome/utility/extensions/extensions_handler.h [modify] https://crrev.com/3b491f68e9be76a22f54208d6c1a3531eb4d8386/mojo/public/tools/bindings/chromium_bindings_configuration.gni
,
Jan 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd3f19adeb8b19062badb591ff33b770dd0eb21f commit cd3f19adeb8b19062badb591ff33b770dd0eb21f Author: noel <noel@chromium.org> Date: Wed Jan 18 13:12:31 2017 Convert utility process WiFi Credentials IPC to mojo Add an OS_WIN mojo API to the utility process to allow callers to get the WiFi credentials for a given network, an API that requires UAC elevation, and used by the chrome extensions private networking API. Add elevation support to the mojo utility process helper class and update tests for that class. Use the helper class to control the utility process (elevate, start, make request, terminate with the response). Add a browser test: post a get credentials request from the blocking pool to simulate how the existing call flow works. Internally post the work to a different thread (IO) before making mojo calls (this to work-around the fact that mojo does not currently support blocking pool callers). Note the browser test does not cover the lower-level WiFi interface since the bots have no access to any WiFi network (good). There's a manual tool to test that aspect with [1] and, in my testing on Win10, that tool works very well. [1] components/wifi/wifi_test.cc BUG= 680928 Review-Url: https://codereview.chromium.org/2610953003 Cr-Commit-Position: refs/heads/master@{#444342} [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/browser/chrome_content_utility_manifest_overlay.json [add] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_browsertest.cc [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/common/extensions/BUILD.gn [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/common/extensions/chrome_utility_extensions_messages.h [add] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/common/extensions/wifi_credentials_getter.mojom [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/test/BUILD.gn [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/utility/chrome_content_utility_client.cc [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/utility/chrome_content_utility_ipc_whitelist.cc [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/utility/extensions/extensions_handler.cc [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/chrome/utility/extensions/extensions_handler.h [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/content/browser/utility_process_mojo_client_browsertest.cc [modify] https://crrev.com/cd3f19adeb8b19062badb591ff33b770dd0eb21f/content/public/browser/utility_process_mojo_client.h
,
Jan 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e commit 643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e Author: noel <noel@chromium.org> Date: Fri Jan 20 14:58:18 2017 Convert utility process CheckMediaFile IPC to mojo Add CheckMediaFile() method to the extensions::mojo::MediaParser mojo interface exposed by the utility process to the browser, update media gallery caller to use mojo calls for this service. Covered by browser tests MediaFileValidatorTest.{ValidVideo, ValidAudio}. Remove the IPC::Send helper to avoid wrapping it in WIN || OSX #ifdef and directly call the real IPC::Send instead. Add TODOs. BUG= 680928 Review-Url: https://codereview.chromium.org/2639503002 Cr-Commit-Position: refs/heads/master@{#445054} [modify] https://crrev.com/643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc [modify] https://crrev.com/643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h [modify] https://crrev.com/643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e/chrome/common/extensions/chrome_utility_extensions_messages.h [modify] https://crrev.com/643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e/chrome/common/extensions/media_parser.mojom [modify] https://crrev.com/643d85c8fd7fb89a8aea1af3f9ac0dc2eb7ba89e/chrome/utility/extensions/extensions_handler.cc
,
Jan 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2ce603cd53ff8a412483d343937b8e65bcfc27dc commit 2ce603cd53ff8a412483d343937b8e65bcfc27dc Author: noel <noel@chromium.org> Date: Tue Jan 24 00:23:15 2017 SafeAudioVideoChecker: use UtilityProcessMojoClient Remove SafeAudioVideoChecker's public derivation from the UtilityProcessHost class, and the interfaces it required, OnMessageReceived, OnProcessCrashed and the state_ member used to prevent multiple callbacks from them. Replace all the above with a UtilityProcessMojoClient, to make the code all mojo, per TODO. Covered by browsertests MediaFileValidatorTest.{ValidVideo,ValidAudio}. BUG= 680928 Review-Url: https://codereview.chromium.org/2644313002 Cr-Commit-Position: refs/heads/master@{#445557} [modify] https://crrev.com/2ce603cd53ff8a412483d343937b8e65bcfc27dc/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc [modify] https://crrev.com/2ce603cd53ff8a412483d343937b8e65bcfc27dc/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h
,
Jan 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/673842136e3567693a64c20dc6aa7b9530b26abc commit 673842136e3567693a64c20dc6aa7b9530b26abc Author: noel <noel@chromium.org> Date: Tue Jan 24 14:21:49 2017 Extensions handler: OnCheckMediaFile is not used CheckMediaFile is all mojo now. OnCheckMediaFile is an orphan and unused, remove it. BUG= 680928 Review-Url: https://codereview.chromium.org/2651563002 Cr-Commit-Position: refs/heads/master@{#445716} [modify] https://crrev.com/673842136e3567693a64c20dc6aa7b9530b26abc/chrome/utility/extensions/extensions_handler.h
,
Feb 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/41fd6ea9c3ae787b3133e96cd2e9a845056dbd24 commit 41fd6ea9c3ae787b3133e96cd2e9a845056dbd24 Author: noel <noel@chromium.org> Date: Thu Feb 02 02:37:05 2017 CheckMediaFile: remove utility process ReleaseProcessIfNeeded call After https://codereview.chromium.org/2644313002, the utility process mojo client for CheckMediaFile controls utility process life-time, so there's no need to call ReleaseProcessIfNeeded in the utility process anymore, remove it. TBR=jochen@chromium.org BUG= 680928 Review-Url: https://codereview.chromium.org/2661453005 Cr-Commit-Position: refs/heads/master@{#447692} [modify] https://crrev.com/41fd6ea9c3ae787b3133e96cd2e9a845056dbd24/chrome/utility/extensions/extensions_handler.cc
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6b03ae83bd948f7389a359acfd3ef8055c142c45 commit 6b03ae83bd948f7389a359acfd3ef8055c142c45 Author: noel <noel@chromium.org> Date: Thu Feb 09 15:28:17 2017 Convert utility process ImageWriter IPC to mojo Add extensions::mojo::RemovableStorageWriter Define a new mojo interface that is exposed by the utility process to the browser. Update the extensions private api image writer caller to use the new interface, rather than IPC, for image writing. Add mojo RemovableStorageWriterClient interface Define a mojo interface to send to utility process image writer, which it can use to send Write and Verify operation progress and completion status back to the caller. Use content::UtilityProcessMojoClient The code used content::UtilityProcessHost to control the utility process. Replace that with the mojo utility client. The mojo channel that connects the caller and the utility process can now be intentionally disconnected, from either end, to implement the Cancel operation. Add a browsertest for WriteCancel and VerifyCancel. Enforce image_writer_utility_client state The original code had state, but never checked the state assumption: that a WRITE or VERIFY operation could be in progress - just never at the same time. Add ResetRequest() between operations to reset state. Add DCHECK at when any new operation is requested to DCHECK that the previous operation if any has been completed. Remove the utility process IPC whitelist The image writer IPC (removed in this CL) were the last remaining entries in the utility process IPC whitelist (these IPC ran elevated on WIN). The whitelist is now unused. Remove all its code and associated files. Define a new member utility_process_running_elevated_, and use it to prevent IPC from being processed if the utility process is elevated. Add image_writer_utility_client_browsertest Again a utility process service with no test. Add a browsertest for Write and Verify operations (invalid, valid, and cancel). Note: the browsertest can't test the low-level USB driver code on any port since our bots don't have USB sticks. To test that aspect, I manually tested with the ChromeOS Recovery Tool [1] and was able to write and verify a ChromeOS image to my USB stick on both Windows and Mac OSX. ImageWriterHandler Add a test mode to allow the class to be browser-tested (with the caveats mentioned above). Add reference to bug 352442 : file handles to the device and image files must remain open between Write and Verify operations. Add WriteVerify test fixture to specifically test that case. [1] http://bit.ly/2jFtsZZ BUG= 680928 Review-Url: https://codereview.chromium.org/2663603002 Cr-Commit-Position: refs/heads/master@{#449296} [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/browser/chrome_content_utility_manifest_overlay.json [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h [add] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client_browsertest.cc [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/common/extensions/BUILD.gn [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/common/extensions/chrome_utility_extensions_messages.h [add] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/common/extensions/removable_storage_writer.mojom [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/test/BUILD.gn [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/BUILD.gn [delete] https://crrev.com/743f8d6db5bc0efd51c3e7ce0fcec1a86886a364/chrome/utility/OWNERS [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/chrome_content_utility_client.cc [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/chrome_content_utility_client.h [delete] https://crrev.com/743f8d6db5bc0efd51c3e7ce0fcec1a86886a364/chrome/utility/chrome_content_utility_ipc_whitelist.cc [delete] https://crrev.com/743f8d6db5bc0efd51c3e7ce0fcec1a86886a364/chrome/utility/chrome_content_utility_ipc_whitelist.h [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/extensions/extensions_handler.cc [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/image_writer/image_writer_handler.cc [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/image_writer/image_writer_handler.h [modify] https://crrev.com/6b03ae83bd948f7389a359acfd3ef8055c142c45/chrome/utility/image_writer/image_writer_unittest.cc
,
Feb 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5 commit 4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5 Author: noel <noel@chromium.org> Date: Tue Feb 14 10:29:01 2017 Convert utility process ParseMediaMetadata blob reading IPC to mojo Update mojo ParseMediaMetadata API Add API documentation. Add a new MediaDataSource interface to the API and document: allow the utility process to request blob data for parsing from the browser process using mojo, rather than IPC. Use content::UtilityProcessMojoClient The code used content::UtilityProcessHost to control the utility process. Replace that with the mojo utility client, remove parser state, implement the MediaDataSource (used to handle utility process blob data requests by calling into existing IO/UI thread blob reader trampolines). Remove the utility process AddHandler ParseMediaMetadata needed the utility client so it could hook its message handler to receive IPC blob data responses from the browser. This can now go: ditch utility client AddHandler() and related. Update metadata::IPCDataSource, MediaMetadataParser Make IPCDataSource own the MediaDataSource and use it to request the blob data. In turn, make MediaMetadataParser own the IPCDataSource. TEST=Covered by MediaGalleriesPlatformAppBrowserTest.GetMetadata BUG= 680928 Review-Url: https://codereview.chromium.org/2667443002 Cr-Commit-Position: refs/heads/master@{#450313} [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.h [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/common/extensions/chrome_utility_extensions_messages.h [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/common/extensions/media_parser.mojom [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/chrome_content_utility_client.cc [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/chrome_content_utility_client.h [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/extensions/extensions_handler.cc [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/extensions/extensions_handler.h [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/media_galleries/ipc_data_source.cc [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/media_galleries/ipc_data_source.h [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/media_galleries/media_metadata_parser.cc [modify] https://crrev.com/4ce9a407ae2f2299f9d62016fd5a4c71e3dc49d5/chrome/utility/media_galleries/media_metadata_parser.h
,
Feb 16 2017
,
Mar 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c4a2fb2a5af868924d3282721757194ded52374d commit c4a2fb2a5af868924d3282721757194ded52374d Author: noel <noel@chromium.org> Date: Wed Mar 15 00:26:05 2017 Safe audio video checker: create mojo client with MakeUnique<> Update to use the current UtilityProcessMojoClient pattern we have settled on for creating these mojo utility clients: base::MakeUnique<UtilityMojoClient<Interface>>(process_name). Covered by browsertests MediaFileValidatorTest.{ValidVideo, ValidAudio}. TBR=tommycli@chromium.org BUG= 680928 Review-Url: https://codereview.chromium.org/2751663002 Cr-Commit-Position: refs/heads/master@{#456912} [modify] https://crrev.com/c4a2fb2a5af868924d3282721757194ded52374d/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
,
Mar 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4434f5f0845ff380c65da956e31ff5ecf1f6b5a4 commit 4434f5f0845ff380c65da956e31ff5ecf1f6b5a4 Author: noel <noel@chromium.org> Date: Wed Mar 15 00:37:05 2017 Safe media metadata parser: create mojo client with MakeUnique<> Create the utility process mojo client with base::MakeUnique<>. No change in behavior, no new tests. BUG= 680928 Review-Url: https://codereview.chromium.org/2746423002 Cr-Commit-Position: refs/heads/master@{#456917} [modify] https://crrev.com/4434f5f0845ff380c65da956e31ff5ecf1f6b5a4/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
,
Mar 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2e4074d748dc65d528e01ef01c59ace2c5fb281f commit 2e4074d748dc65d528e01ef01c59ace2c5fb281f Author: noel <noel@chromium.org> Date: Wed Mar 15 00:48:02 2017 Image writer client: create mojo client with MakeUnique<> Create the utility process mojo client with base::MakeUnique<>. Also append IfNeeded to the start utility process routine (since we don't start the utility process if it's already active). No change in behavior, no new tests. BUG= 680928 Review-Url: https://codereview.chromium.org/2751573004 Cr-Commit-Position: refs/heads/master@{#456923} [modify] https://crrev.com/2e4074d748dc65d528e01ef01c59ace2c5fb281f/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc [modify] https://crrev.com/2e4074d748dc65d528e01ef01c59ace2c5fb281f/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h
,
Mar 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4342d3eacba11f513071dd4bb06b182b4f1245f3 commit 4342d3eacba11f513071dd4bb06b182b4f1245f3 Author: noel <noel@chromium.org> Date: Mon Mar 20 08:08:32 2017 ImageWriter: Add ShouldResetImageWriter helper Move the code for resetting the image_writer_ into a common helper. Add comments, refer back to the original crbug.com issue and change set that resolved issue 352442 . Covered by existing tests: image_writer_utility_client_browsertest, image_writer_unittest BUG= 680928 , 352442 Review-Url: https://codereview.chromium.org/2734773002 Cr-Commit-Position: refs/heads/master@{#458024} [modify] https://crrev.com/4342d3eacba11f513071dd4bb06b182b4f1245f3/chrome/utility/image_writer/image_writer_handler.cc [modify] https://crrev.com/4342d3eacba11f513071dd4bb06b182b4f1245f3/chrome/utility/image_writer/image_writer_handler.h
,
Mar 29 2017
chrome/common/extensions/chrome_utility_extensions_messages.h The remaining messages in this file, per bug 542912 #19 -#21, are deprecated. A note about this was added in http://crrev.com/460280 (see the change to chrome/utility/extensions/extensions_handler.h there). +tommycli as FYI: feel free to deprecate away when ready.
,
Mar 29 2017
,
Mar 29 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by noel@chromium.org
, Jan 13 2017Status: Started (was: Untriaged)