Index: chrome/app/mash/mash_runner.cc |
diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc |
index e3c1c7334794ac989a4656479a79b2f1b63be7c5..bc21a6acee2228010f4c198fb8531ca27f05b7bb 100644 |
--- a/chrome/app/mash/mash_runner.cc |
+++ b/chrome/app/mash/mash_runner.cc |
@@ -29,6 +29,9 @@ |
#include "services/shell/public/interfaces/service_factory.mojom.h" |
#include "services/shell/runner/common/switches.h" |
#include "services/shell/runner/host/child_process_base.h" |
+#include "ui/base/resource/resource_bundle.h" |
+#include "ui/base/ui_base_paths.h" |
+#include "ui/base/ui_base_switches.h" |
using shell::mojom::ServiceFactory; |
@@ -44,6 +47,15 @@ bool IsChild() { |
switches::kProcessType) == kMashChild; |
} |
+void InitializeResources() { |
+ ui::RegisterPathProvider(); |
+ const std::string locale = |
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
+ switches::kLang); |
+ ui::ResourceBundle::InitSharedInstanceWithLocale( |
msw
2016/10/03 22:07:39
nit: add a comment that this loads Chrome's resour
sadrul
2016/10/04 00:42:48
Done.
|
+ locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
sky
2016/10/03 22:17:17
nullptr
sadrul
2016/10/04 00:42:48
Done.
|
+} |
+ |
// Convert the command line program from chrome_mash to chrome. This is |
// necessary as the shell will attempt to start chrome_mash. We want chrome. |
void ChangeChromeMashToChrome(base::CommandLine* command_line) { |
@@ -120,6 +132,7 @@ void MashRunner::RunMain() { |
void MashRunner::RunChild() { |
base::i18n::InitializeICU(); |
+ InitializeResources(); |
shell::ChildProcessMainWithCallback( |
base::Bind(&MashRunner::StartChildApp, base::Unretained(this))); |
} |