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

Unified Diff: chrome/renderer/render_process_impl.cc

Issue 6537022: Move media library path resolution into Chrome path provider. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Get rid of spurious changes in previous patch-set. Created 9 years, 9 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 | « chrome/renderer/render_process_impl.h ('k') | chrome/service/service_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_process_impl.cc
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index 34f21388293fe0cdc45e1eec5d107619d380fdd6..45c4427b3d0e23d275d3823ea9a12b9829767d05 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -131,21 +131,18 @@ RenderProcessImpl::RenderProcessImpl()
base::StatisticsRecorder::set_dump_on_exit(true);
}
-#if defined(OS_MACOSX)
- FilePath bundle_path = base::mac::MainAppBundlePath();
-
- initialized_media_library_ =
- media::InitializeMediaLibrary(bundle_path.Append("Libraries"));
-#else
- FilePath module_path;
- initialized_media_library_ =
- PathService::Get(base::DIR_MODULE, &module_path) &&
- media::InitializeMediaLibrary(module_path);
+ // Note that under Linux, the media library will normally already have
+ // been initialized by the Zygote before this instance became a Renderer.
+ FilePath media_path;
+ if (PathService::Get(chrome::DIR_MEDIA_LIBS, &media_path))
+ media::InitializeMediaLibrary(media_path);
+#if !defined(OS_MACOSX)
// TODO(hclam): Add more checks here. Currently this is not used.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
+ if (media::IsMediaLibraryInitialized() &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableOpenMax)) {
- media::InitializeOpenMaxLibrary(module_path);
+ media::InitializeOpenMaxLibrary(media_path);
}
#endif
@@ -277,7 +274,7 @@ bool RenderProcessImpl::UseInProcessPlugins() const {
}
bool RenderProcessImpl::HasInitializedMediaLibrary() const {
- return initialized_media_library_;
+ return media::IsMediaLibraryInitialized();
}
bool RenderProcessImpl::GetTransportDIBFromCache(TransportDIB** mem,
« no previous file with comments | « chrome/renderer/render_process_impl.h ('k') | chrome/service/service_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698