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

Unified Diff: components/html_viewer/global_state.cc

Issue 1429263005: Revert of mandoline: Fix ICU initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « components/html_viewer/BUILD.gn ('k') | components/html_viewer/html_viewer_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/global_state.cc
diff --git a/components/html_viewer/global_state.cc b/components/html_viewer/global_state.cc
index 9d7f46b3947885f9bb593cf0390a4a992ea16868..a0bb8bec750138ad0e86f942cae3c2c09d93b321 100644
--- a/components/html_viewer/global_state.cc
+++ b/components/html_viewer/global_state.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/i18n/icu_util.h"
#include "base/logging.h"
#include "components/html_viewer/blink_platform_impl.h"
#include "components/html_viewer/blink_settings_impl.h"
@@ -145,12 +146,15 @@
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
base::File pak_file = resource_loader_.ReleaseFile(kResourceResourcesPak);
- bool initialize_ui = true;
+ bool initialize_icu_and_ui = true;
#if defined(COMPONENT_BUILD)
if (command_line->HasSwitch("single-process"))
- initialize_ui = false;
-#endif
- if (initialize_ui) {
+ initialize_icu_and_ui = false;
+#endif
+ if (initialize_icu_and_ui) {
+ base::i18n::InitializeICUWithFileDescriptor(
+ resource_loader_.GetICUFile().TakePlatformFile(),
+ base::MemoryMappedFile::Region::kWholeFile);
ui::RegisterPathProvider();
base::File pak_file_2 = pak_file.Duplicate();
ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
« no previous file with comments | « components/html_viewer/BUILD.gn ('k') | components/html_viewer/html_viewer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698