Comment 3 for bug 1577514

As a minor detail, we should build this as a generic library that can be reused for other similar cases. I suggest supporting the DEV_SHM_PREFIX (for chromium it'd be set to ".org.chromium.Chromium", for example), and using SNAP_NAME on the replacement which should already be in the process space.