Chromium Code Reviews| 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. |