Description: try alternative locations for the Widevine CDM library:
  - $HOME/.local/lib/WidevineCdm/ (snap-friendly, see https://launchpad.net/bugs/1738149)
  - /opt/google/chrome/WidevineCdm/ (installed by official google chrome package)
 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
@@ -315,6 +315,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;
 #if !BUILDFLAG(IS_CHROMEOS_ASH)
