Description: try an alternative location for the Widevine CDM library
 ($HOME/.local/lib/WidevineCdm/ - snap-friendly, see https://launchpad.net/bugs/1738149)
 The manifest lives at the top level, whereas libwidevinecdm.so is inside
 a platform specific directory, see media::GetPlatformSpecificDirectory(…).
Author: Olivier Tilloy <olivier.tilloy@canonical.com>

--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -320,6 +320,15 @@ bool PathProvider(int key, base::FilePat
 
 #if BUILDFLAG(ENABLE_WIDEVINE)
     case chrome::DIR_BUNDLED_WIDEVINE_CDM:
+      base::PathService::Get(base::DIR_HOME, &cur);
+      cur = cur.Append(FILE_PATH_LITERAL(".local/lib"))
+               .AppendASCII(kWidevineCdmBaseDirectory);
+      if (base::PathExists(cur))
+        break;
+      cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome"))
+               .AppendASCII(kWidevineCdmBaseDirectory);
+      if (base::PathExists(cur))
+        break;
       if (!GetComponentDirectory(&cur))
         return false;
       cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
