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
@@ -317,8 +317,17 @@ bool PathProvider(int key, base::FilePat
       break;
 
 #if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && \
-    BUILDFLAG(BUNDLE_WIDEVINE_CDM)
+    BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
     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)
@@ -328,7 +337,7 @@ bool PathProvider(int key, base::FilePat
 #endif  // !BUILDFLAG(IS_CHROMEOS_ASH)
       break;
 #endif  // (defined(OS_LINUX) || defined(OS_CHROMEOS)) &&
-        // BUILDFLAG(BUNDLE_WIDEVINE_CDM)
+        // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
 
 #if (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
     BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
