Chromium Code Reviews| Index: extensions/shell/app/shell_main_delegate.cc |
| diff --git a/extensions/shell/app/shell_main_delegate.cc b/extensions/shell/app/shell_main_delegate.cc |
| index 69f0e6181b661fb1d15aec4b6a4fca096d28abe4..0ec398f6b9cf0a00b927e2b154d79f4cdcadf219 100644 |
| --- a/extensions/shell/app/shell_main_delegate.cc |
| +++ b/extensions/shell/app/shell_main_delegate.cc |
| @@ -22,6 +22,10 @@ |
| #include "chromeos/chromeos_paths.h" |
| #endif |
| +#if defined(OS_MACOSX) |
| +#include "extensions/shell/app/paths_mac.h" |
| +#endif |
| + |
| #if !defined(DISABLE_NACL) |
| #include "components/nacl/common/nacl_switches.h" |
| #if defined(OS_LINUX) |
| @@ -61,6 +65,12 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { |
| content_client_.reset(CreateContentClient()); |
| SetContentClient(content_client_.get()); |
| +#if defined(OS_MACOSX) |
| + OverrideChildProcessFilePath(); |
| + // This must happen before InitializeResourceBundle. |
| + OverrideFrameworkBundlePath(); |
| +#endif |
| + |
| #if defined(OS_CHROMEOS) |
| chromeos::RegisterPathProvider(); |
| #endif |
| @@ -125,10 +135,16 @@ ShellMainDelegate::CreateShellContentUtilityClient() { |
| void ShellMainDelegate::InitializeResourceBundle() { |
| base::FilePath extensions_shell_and_test_pak_path; |
| +#if defined(OS_MACOSX) |
| + extensions_shell_and_test_pak_path = GetResourcesPakFilePath(); |
|
James Cook
2014/12/10 21:05:00
It feels a little weird that sometimes you call a
Yoyo Zhou
2014/12/11 02:40:50
I moved the GetResourcesPakFilePath implementation
|
| +#else |
| PathService::Get(base::DIR_MODULE, &extensions_shell_and_test_pak_path); |
| - ui::ResourceBundle::InitSharedInstanceWithPakPath( |
| + extensions_shell_and_test_pak_path = |
| extensions_shell_and_test_pak_path.AppendASCII( |
| - "extensions_shell_and_test.pak")); |
| + "extensions_shell_and_test.pak"); |
| +#endif // OS_MACOSX |
| + ui::ResourceBundle::InitSharedInstanceWithPakPath( |
| + extensions_shell_and_test_pak_path); |
| } |
| // static |