Expose Finch features to Crosh and other Chrome OS processes

124 views
Skip to first unread message

Tim Zheng

unread,
Jan 10, 2018, 6:16:37 PM1/10/18
to Chromium OS dev
Is there a recommended way to share Finch features to Crosh? D-Bus or mojo or something else?

Thank you
Tim

Mike Frysinger

unread,
Jan 11, 2018, 3:52:07 PM1/11/18
to Tim Zheng, Chromium OS dev
backing up, who is managing the finch database ?  is it all under Chrome ?  if so, dbus is preferable.  then again, if it's in Chrome, doesn't it already have a chrome:// page for it so crosh wouldn't be needed ?
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Scott Violet

unread,
Jan 11, 2018, 3:55:22 PM1/11/18
to Mike Frysinger, Tim Zheng, Chromium OS dev
Finch state is held by Chrome. I'm not sure what system you need this for, but it's entirely possible Chrome isn't running at the time you would need the information.

  -Scott

Mike Frysinger

unread,
Jan 11, 2018, 3:58:54 PM1/11/18
to Scott Violet, Tim Zheng, Chromium OS dev
we have the same issue with the policy db and proxy info, so i think we have precedence to refer to
-mike

Tim Zheng 鄭雲生

unread,
Jan 11, 2018, 4:33:38 PM1/11/18
to Mike Frysinger, Scott Violet, Chromium OS dev
Currently I have 2 places that need to check this value. 1) A program that's invoked within crosh 2) The app list UI. Is Chrome possible to be not running while the app list is? How is it addressed with policy db and proxy info?

Tim Zheng 鄭雲生

unread,
Jan 11, 2018, 4:35:28 PM1/11/18
to Mike Frysinger, Scott Violet, Jeffrey Kardatzke, Chromium OS dev
+Jeffrey Kardatzke

Zelidrag Hornung

unread,
Jan 11, 2018, 4:50:03 PM1/11/18
to Tim Zheng 鄭雲生, Mike Frysinger, Scott Violet, Jeffrey Kardatzke, Chromium OS dev
Nope - Chrome is always running right now and app list UI is served from it.

You probably just want to pass new command line switches derived from Finch values to the process underneath Crosh.

Mike Frysinger

unread,
Jan 11, 2018, 6:39:26 PM1/11/18
to Zelidrag Hornung, Tim Zheng 鄭雲生, Scott Violet, Jeffrey Kardatzke, Chromium OS dev
if Chrome had a dbus end point to query Finch experiments, that'd be feasible.  another option would be to have the program itself do the query and change its (default) behavior.  that might be preferable as we like to keep crosh light (due to its shell script nature).
-mike

Tim Zheng 鄭雲生

unread,
Jan 11, 2018, 8:09:12 PM1/11/18
to Mike Frysinger, Zelidrag Hornung, Scott Violet, Jeffrey Kardatzke, Chromium OS dev
Hi Mike,

Is it possible to pass in a command line parameter to crosh from chrome when crosh is started? I'm thinking I might want to remove this particular crosh command depending on this parameter. Is this considered a clean approach? Can you give me an example if this is regularly done? Or is querying a D-Bus interface a more preferred approach?

Thanks
Tim

Mike Frysinger

unread,
Jan 12, 2018, 12:56:29 AM1/12/18
to Tim Zheng 鄭雲生, Zelidrag Hornung, Scott Violet, Jeffrey Kardatzke, Chromium OS dev
crosh is spawned from Chrome, so it could change the flags it passes, but i don't think that's the route we want to go.  the images are all public so people can still see the commands.  it'd also complicate the code.  we already have commands in crosh that aren't available on all devices, and crosh is a developer tool, so shouldn't be a problem to have one say "this is unavailable".
-mike
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages