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

Side by Side Diff: mojo/runner/context.cc

Issue 1431133003: mandoline: Reland "Fix ICU initialization". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT and then fix compile. 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 unified diff | Download patch
« no previous file with comments | « mojo/runner/BUILD.gn ('k') | mojo/runner/host/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/runner/context.h" 5 #include "mojo/runner/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/i18n/icu_util.h"
12 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
15 #include "base/path_service.h" 16 #include "base/path_service.h"
16 #include "base/process/process_info.h" 17 #include "base/process/process_info.h"
17 #include "base/run_loop.h" 18 #include "base/run_loop.h"
18 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_split.h" 20 #include "base/strings/string_split.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "base/trace_event/trace_event.h" 22 #include "base/trace_event/trace_event.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 *base::CommandLine::ForCurrentProcess(); 192 *base::CommandLine::ForCurrentProcess();
192 193
193 bool trace_startup = command_line.HasSwitch(switches::kTraceStartup); 194 bool trace_startup = command_line.HasSwitch(switches::kTraceStartup);
194 if (trace_startup) { 195 if (trace_startup) {
195 tracer_.Start( 196 tracer_.Start(
196 command_line.GetSwitchValueASCII(switches::kTraceStartup), 197 command_line.GetSwitchValueASCII(switches::kTraceStartup),
197 command_line.GetSwitchValueASCII(switches::kTraceStartupDuration), 198 command_line.GetSwitchValueASCII(switches::kTraceStartupDuration),
198 "mojo_runner.trace"); 199 "mojo_runner.trace");
199 } 200 }
200 201
202 // ICU data is a thing every part of the system needs. This here warms
203 // up the copy of ICU in the mojo runner.
204 CHECK(base::i18n::InitializeICU());
205
201 EnsureEmbedderIsInitialized(); 206 EnsureEmbedderIsInitialized();
202 task_runners_.reset( 207 task_runners_.reset(
203 new TaskRunners(base::MessageLoop::current()->task_runner())); 208 new TaskRunners(base::MessageLoop::current()->task_runner()));
204 209
205 // TODO(vtl): This should be MASTER, not NONE. 210 // TODO(vtl): This should be MASTER, not NONE.
206 embedder::InitIPCSupport( 211 embedder::InitIPCSupport(
207 embedder::ProcessType::NONE, task_runners_->shell_runner(), this, 212 embedder::ProcessType::NONE, task_runners_->shell_runner(), this,
208 task_runners_->io_runner(), embedder::ScopedPlatformHandle()); 213 task_runners_->io_runner(), embedder::ScopedPlatformHandle());
209 214
210 package_manager_ = new package_manager::PackageManagerImpl( 215 package_manager_ = new package_manager::PackageManagerImpl(
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 base::MessageLoop::current()->QuitWhenIdle(); 340 base::MessageLoop::current()->QuitWhenIdle();
336 } else { 341 } else {
337 app_complete_callback_.Run(); 342 app_complete_callback_.Run();
338 } 343 }
339 } 344 }
340 } 345 }
341 } 346 }
342 347
343 } // namespace runner 348 } // namespace runner
344 } // namespace mojo 349 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/BUILD.gn ('k') | mojo/runner/host/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698