Comment 11 for bug 1260103

Revision history for this message
Olivier Tilloy (osomon) wrote :

This is how the code that overrides the path for shared memory in oxide would look like. How does that look?

base::FilePath GetSharedMemoryPath() {
  // snap packages
  const char* tmp = getenv("SNAP_NAME");
  if (tmp) {
    return base::FilePath(std::string("/dev/shm/snap.") + tmp + ".oxide");
  }

  // click packages
  tmp = getenv("APP_PKGNAME");
  if (tmp) {
    return base::FilePath(std::string("/dev/shm/") + tmp + ".oxide");
  }

  // default
  return base::FilePath("/dev/shm");
}