| Index: headless/lib/headless_content_main_delegate.cc
|
| diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
|
| index 9428908a6657555fd751c6f28ff32fdd3554a188..0139f8225355f3916add506c25acacfb4100870b 100644
|
| --- a/headless/lib/headless_content_main_delegate.cc
|
| +++ b/headless/lib/headless_content_main_delegate.cc
|
| @@ -34,6 +34,12 @@
|
| #endif
|
|
|
| #if defined(OS_MACOSX)
|
| +#include "base/mac/bundle_locations.h"
|
| +#else
|
| +#include "ui/base/ui_base_paths.h"
|
| +#endif
|
| +
|
| +#if defined(OS_MACOSX)
|
| #include "components/crash/content/app/crashpad.h"
|
| #endif
|
|
|
| @@ -244,6 +250,15 @@ void HeadlessContentMainDelegate::InitializeResourceBundle() {
|
| bool result = PathService::Get(base::DIR_MODULE, &dir_module);
|
| DCHECK(result);
|
|
|
| + // Override locale pak dir to 'headless_locales'.
|
| + base::FilePath locale_pak =
|
| + dir_module.Append(FILE_PATH_LITERAL("headless_locales"));
|
| +#if defined(OS_MACOSX)
|
| + base::mac::SetOverrideFrameworkBundlePath(locale_pak);
|
| +#else
|
| + PathService::Override(ui::DIR_LOCALES, locale_pak);
|
| +#endif
|
| +
|
| base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
| const std::string locale = command_line->GetSwitchValueASCII(switches::kLang);
|
| ui::ResourceBundle::InitSharedInstanceWithLocale(
|
|
|