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

Unified Diff: content/browser/zygote_main_linux.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: And again, this time with working tests... Created 9 years, 10 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: content/browser/zygote_main_linux.cc
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc
index 188ad34f62b43d253f3e45fc28709798d844b5f8..0b120923942bc3cc5b10b7e611605c74ba3f6d9c 100644
--- a/content/browser/zygote_main_linux.cc
+++ b/content/browser/zygote_main_linux.cc
@@ -36,6 +36,7 @@
#include "base/sys_info.h"
#include "build/build_config.h"
#include "chrome/common/chrome_descriptors.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/font_config_ipc_linux.h"
#include "chrome/common/main_function_params.h"
@@ -596,9 +597,12 @@ static void PreSandboxInit() {
// cached and there's no more need to access the file system.
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
- FilePath module_path;
- if (PathService::Get(base::DIR_MODULE, &module_path))
- media::InitializeMediaLibrary(module_path);
+ // If we can't get a path to load media libraries from, or if loading
+ // them fails, we'll crash if we try to call into them. Code should
+ // be sure to check media::IsMediaLibraryInitialized() before doing so!
awong 2011/02/25 02:41:59 Exclamations are discouraged in comments :)
+ FilePath media_path;
+ if (PathService::Get(chrome::DIR_MEDIA_LIBS, &media_path))
+ media::InitializeMediaLibrary(media_path);
// Ensure access to the Pepper plugins before the sandbox is turned on.
PepperPluginRegistry::PreloadModules();

Powered by Google App Engine
This is Rietveld 408576698