Jerry Krinock
unread,Sep 25, 2023, 1:59:23 AM9/25/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Simeon Vincent, Chromium Extensions, Jerry Krinock, wOxxOm
Thanks to wOxxOm and Simeon for the replies.
We use the profile name because, in the user interface of our app, the user needs to be able to edit (add and delete) which Chrome profile(s) they are syncing bookmarks with. Therefore, whatever attribute we use must be recognizable by the user and reflect what they see in the user interface of Chrome.
I was quite surprised to learn that Chrome would allow the user to assign the same name to two different profiles! The user can also assign the same avatar and same theme color, and after doing so the Profiles menu contains two items with identical appearance that open different profiles. Not a good situation! Fortunately, but not surprisingly, we have never had a support request from a user who so shot themself in the foot by assigning the same name to two profiles. Since such a user would first face confusion in Chrome, I'm not going to worry about it.
I also just tested our app and found that if the user changes their profile name in Chrome, the changed profile name is recognized by our app. So apparently we are using maybe the immutable key name in the LocalState json file ("Default", "Profile 1", "Profile 2", etc.) under the hood.
Anyhow, back to the original topic – it appears that there is still no supported method to the get any kind of profile identifier from the WebExtensions API. I've thought about those window properties (I suppose these would be the properties of an Offscreen Document in our extension), but have not found anything that would work on a Mac, and in Opera, Vivaldi, etc. Therefore, we shall continue our past practice of setting the profile name as part of our installation process and storing it.