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

Unified Diff: chrome/common/chrome_paths.cc

Issue 14743002: Do not use bundles for the CDM on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bundle the adapter for the component installer. Created 7 years, 8 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
Index: chrome/common/chrome_paths.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index abe5da30baf5dcb2d74b9d6d30df55046b2bf062..6794d68cf8ed647b6cbac4e80d5e419e3f442392 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -363,8 +363,28 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.Append(kWidevineCdmBaseDirectory);
break;
case chrome::FILE_WIDEVINE_CDM_PLUGIN:
+#if defined(OS_MACOSX)
+ // This is only for testing. The production path uses DIR_WIDEVINE_CDM.
+ // Find the adapter (and CDM) in the directory where it gets built.
+ // Use DIR_MODULE because it is consistent in both browser and renderers.
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+ if (base::mac::AmIBundled()) {
+ // If we're called from chrome, it's beside the app (outside the
+ // app bundle), if we're called from a unittest, we'll already be
+ // outside the bundle so use the exe dir.
+ // DIR_MODULE gave us .../
xhwang 2013/05/02 19:39:17 what's .../ ?
ddorwin 2013/05/02 20:35:57 Done.
+ // Chromium.app/Contents/Versions/<v>/Google Chrome Framework.framework.
+ cur = cur.DirName();
+ cur = cur.DirName();
+ cur = cur.DirName();
+ cur = cur.DirName();
+ cur = cur.DirName();
xhwang 2013/05/02 19:39:17 why call this 5 times?
ddorwin 2013/05/02 20:35:57 Each one returns the parent directory I guess. The
+ }
+#else
if (!GetInternalPluginsDirectory(&cur))
return false;
+#endif
cur = cur.Append(kWidevineCdmPluginFileName);
break;
#endif

Powered by Google App Engine
This is Rietveld 408576698