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

Side by Side Diff: mojo/runner/context.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 unified diff | Download patch
« no previous file with comments | « mojo/runner/child_process.cc ('k') | mojo/runner/in_process_native_runner.cc » ('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"
13 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
14 #include "base/macros.h" 13 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
16 #include "base/path_service.h" 15 #include "base/path_service.h"
17 #include "base/process/process_info.h" 16 #include "base/process/process_info.h"
18 #include "base/run_loop.h" 17 #include "base/run_loop.h"
19 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_split.h" 19 #include "base/strings/string_split.h"
21 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
22 #include "base/trace_event/trace_event.h" 21 #include "base/trace_event/trace_event.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 void Context::EnsureEmbedderIsInitialized() { 185 void Context::EnsureEmbedderIsInitialized() {
187 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; 186 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER;
188 setup.Get(); 187 setup.Get();
189 } 188 }
190 189
191 bool Context::Init() { 190 bool Context::Init() {
192 TRACE_EVENT0("mojo_shell", "Context::Init"); 191 TRACE_EVENT0("mojo_shell", "Context::Init");
193 const base::CommandLine& command_line = 192 const base::CommandLine& command_line =
194 *base::CommandLine::ForCurrentProcess(); 193 *base::CommandLine::ForCurrentProcess();
195 194
196 // ICU data is a thing every part of the system needs. This here warms
197 // up the copy of ICU in the mojo runner.
198 base::i18n::InitializeICU();
199
200 EnsureEmbedderIsInitialized(); 195 EnsureEmbedderIsInitialized();
201 task_runners_.reset( 196 task_runners_.reset(
202 new TaskRunners(base::MessageLoop::current()->task_runner())); 197 new TaskRunners(base::MessageLoop::current()->task_runner()));
203 198
204 // TODO(vtl): This should be MASTER, not NONE. 199 // TODO(vtl): This should be MASTER, not NONE.
205 embedder::InitIPCSupport( 200 embedder::InitIPCSupport(
206 embedder::ProcessType::NONE, task_runners_->shell_runner(), this, 201 embedder::ProcessType::NONE, task_runners_->shell_runner(), this,
207 task_runners_->io_runner(), embedder::ScopedPlatformHandle()); 202 task_runners_->io_runner(), embedder::ScopedPlatformHandle());
208 203
209 package_manager_ = new package_manager::PackageManagerImpl( 204 package_manager_ = new package_manager::PackageManagerImpl(
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 base::MessageLoop::current()->QuitWhenIdle(); 328 base::MessageLoop::current()->QuitWhenIdle();
334 } else { 329 } else {
335 app_complete_callback_.Run(); 330 app_complete_callback_.Run();
336 } 331 }
337 } 332 }
338 } 333 }
339 } 334 }
340 335
341 } // namespace runner 336 } // namespace runner
342 } // namespace mojo 337 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/child_process.cc ('k') | mojo/runner/in_process_native_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698