Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: media/cdm/cdm_adapter_factory.cc

Issue 2904983004: media: Fix CDM path in CdmAdapterFactory (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/cdm_adapter_factory.cc
diff --git a/media/cdm/cdm_adapter_factory.cc b/media/cdm/cdm_adapter_factory.cc
index 55d19494f4d01ac769d27ae8865208ae7b77930d..6c9c08595aea0838e306a70b0a31040e080dd6ee 100644
--- a/media/cdm/cdm_adapter_factory.cc
+++ b/media/cdm/cdm_adapter_factory.cc
@@ -14,7 +14,12 @@
#include "media/base/key_systems.h"
#include "media/cdm/cdm_adapter.h"
#include "media/cdm/cdm_paths.h"
-#include "third_party/widevine/cdm/widevine_cdm_common.h"
+
+#if defined(OS_MACOSX)
+#include "base/mac/bundle_locations.h"
+#endif
+
+#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
namespace media {
@@ -54,11 +59,19 @@ void CdmAdapterFactory::Create(
// TODO(xhwang): We should have the CDM path forwarded from the browser
// already. See http://crbug.com/510604
base::FilePath cdm_base_path;
+
+#if defined(OS_MACOSX)
+ base::FilePath framework_bundle_path = base::mac::FrameworkBundlePath();
+ cdm_base_path = framework_bundle_path.Append("Libraries");
+#else
base::PathService::Get(base::DIR_MODULE, &cdm_base_path);
+#endif
+
cdm_base_path = cdm_base_path.Append(
GetPlatformSpecificDirectory(kWidevineCdmBaseDirectory));
cdm_path = cdm_base_path.AppendASCII(
base::GetNativeLibraryName(kWidevineCdmLibraryName));
+ DVLOG(1) << "CDM path: " << cdm_path.value();
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698