Description: try alternative locations for libwidevinecdmadapter.so:
  - $HOME/.local/lib/ (snap-friendly, see https://launchpad.net/bugs/1738149)
  - /opt/google/chrome/ (installed by official google chrome package)
Author: Olivier Tilloy <olivier.tilloy@canonical.com>

--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -379,6 +379,15 @@ bool PathProvider(int key, base::FilePat
     // In the component case, this is the source adapter. Otherwise, it is the
     // actual Pepper module that gets loaded.
     case chrome::FILE_WIDEVINE_CDM_ADAPTER:
+      PathService::Get(base::DIR_HOME, &cur);
+      cur = cur.Append(FILE_PATH_LITERAL(".local/lib/libwidevinecdmadapter.so"));
+      if (base::PathExists(cur)) {
+        break;
+      }
+      if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/libwidevinecdmadapter.so")))) {
+        cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/libwidevinecdmadapter.so"));
+        break;
+      }
       if (!GetComponentDirectory(&cur))
         return false;
       cur = cur.Append(
