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

Unified Diff: chrome/service/service_process.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: chrome/service/service_process.cc
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index b49bdb1496cd22699904276a48ff3ec32fa38b24..384f5a83958ebf78e720feaaf422e2ba1c7b4fbe 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -172,23 +172,15 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop,
#if defined(ENABLE_REMOTING)
// Load media codecs, required by the Chromoting host
- bool initialized_media_library = false;
-#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);
-#endif
-
- // Initialize chromoting host manager.
- remoting_host_manager_ = new remoting::ChromotingHostManager(this);
- remoting_host_manager_->Initialize(message_loop,
- file_thread_->message_loop_proxy());
+ if (PathService::Get(chrome::DIR_MEDIA_LIBS, &module_path))
awong 2011/02/25 02:41:59 Single-line ifs seem to be wrapped in braces in th
+ media::InitializeMediaLibrary(module_path);
+ if (media::IsMediaLibraryInitialized()) {
+ // Initialize chromoting host manager.
+ remoting_host_manager_ = new remoting::ChromotingHostManager(this);
+ remoting_host_manager_->Initialize(message_loop,
+ file_thread_->message_loop_proxy());
+ }
#endif // ENABLE_REMOTING
// Enable Cloud Print if needed. First check the command-line.

Powered by Google App Engine
This is Rietveld 408576698