blob: 99cc64f68438f6132589c88653043328cbdd71d1 [file] [log] [blame]
[email protected]a3b85d852012-01-27 02:04:481// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]373c1062011-06-09 21:11:512// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]c4f883a2012-02-03 17:02:075#include "content/browser/utility_process_host_impl.h"
[email protected]373c1062011-06-09 21:11:516
danakje3de838f2015-12-03 01:49:407#include <utility>
8
jddukeb7ce1e32015-03-18 00:14:179#include "base/base_switches.h"
[email protected]037edb52011-11-15 21:14:0610#include "base/bind.h"
11#include "base/bind_helpers.h"
[email protected]373c1062011-06-09 21:11:5112#include "base/command_line.h"
rickyz50109312015-11-11 00:37:0813#include "base/files/file_path.h"
[email protected]6d057a0c2013-07-09 21:12:0714#include "base/lazy_instance.h"
avib7348942015-12-25 20:57:1015#include "base/macros.h"
[email protected]6d057a0c2013-07-09 21:12:0716#include "base/message_loop/message_loop.h"
amistry467cdc72015-03-13 01:58:4717#include "base/process/process_handle.h"
[email protected]6d057a0c2013-07-09 21:12:0718#include "base/run_loop.h"
[email protected]fb441962013-05-08 05:35:2419#include "base/sequenced_task_runner.h"
[email protected]74ebfb12013-06-07 20:48:0020#include "base/strings/utf_string_conversions.h"
[email protected]6d057a0c2013-07-09 21:12:0721#include "base/synchronization/lock.h"
22#include "base/synchronization/waitable_event.h"
avib7348942015-12-25 20:57:1023#include "build/build_config.h"
[email protected]4c01d4992012-01-23 23:33:0124#include "content/browser/browser_child_process_host_impl.h"
amistry467cdc72015-03-13 01:58:4725#include "content/browser/mojo/mojo_application_host.h"
[email protected]6d057a0c2013-07-09 21:12:0726#include "content/browser/renderer_host/render_process_host_impl.h"
[email protected]4734d0b2011-12-03 07:10:4427#include "content/common/child_process_host_impl.h"
morritac6238ab2015-03-18 01:48:2928#include "content/common/in_process_child_thread_params.h"
[email protected]373c1062011-06-09 21:11:5129#include "content/common/utility_messages.h"
[email protected]b7b63872013-01-03 02:41:1930#include "content/public/browser/browser_thread.h"
[email protected]87f3c082011-10-19 18:07:4431#include "content/public/browser/content_browser_client.h"
[email protected]c4f883a2012-02-03 17:02:0732#include "content/public/browser/utility_process_host_client.h"
[email protected]c08950d22011-10-13 22:20:2933#include "content/public/common/content_switches.h"
[email protected]6d057a0c2013-07-09 21:12:0734#include "content/public/common/process_type.h"
wfh182da09c2015-06-24 19:23:0335#include "content/public/common/sandbox_type.h"
[email protected]121e61382014-03-13 11:35:1536#include "content/public/common/sandboxed_process_launcher_delegate.h"
[email protected]373c1062011-06-09 21:11:5137#include "ipc/ipc_switches.h"
38#include "ui/base/ui_base_switches.h"
39
kerrnelafd49a83b2016-01-22 21:16:1540#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
41#include "content/public/browser/zygote_handle_linux.h"
42#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
43
rickyz50109312015-11-11 00:37:0844#if defined(OS_WIN)
45#include "sandbox/win/src/sandbox_policy.h"
46#include "sandbox/win/src/sandbox_types.h"
47#endif
48
[email protected]c4f883a2012-02-03 17:02:0749namespace content {
50
kerrnelafd49a83b2016-01-22 21:16:1551#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
52namespace {
53ZygoteHandle g_utility_zygote;
54} // namespace
55#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
56
[email protected]34f48682013-03-20 00:30:1857// NOTE: changes to this class need to be reviewed by the security team.
58class UtilitySandboxedProcessLauncherDelegate
59 : public SandboxedProcessLauncherDelegate {
60 public:
[email protected]121e61382014-03-13 11:35:1561 UtilitySandboxedProcessLauncherDelegate(const base::FilePath& exposed_dir,
amistry467cdc72015-03-13 01:58:4762 bool launch_elevated,
63 bool no_sandbox,
amistry5f70aa5e2015-02-25 00:46:4064 const base::EnvironmentMap& env,
[email protected]121e61382014-03-13 11:35:1565 ChildProcessHost* host)
66 : exposed_dir_(exposed_dir),
67#if defined(OS_WIN)
68 launch_elevated_(launch_elevated)
69#elif defined(OS_POSIX)
70 env_(env),
kerrnelafd49a83b2016-01-22 21:16:1571#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
[email protected]121e61382014-03-13 11:35:1572 no_sandbox_(no_sandbox),
kerrnelafd49a83b2016-01-22 21:16:1573#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
[email protected]121e61382014-03-13 11:35:1574 ipc_fd_(host->TakeClientFileDescriptor())
75#endif // OS_WIN
76 {}
77
dchengc2282aa2014-10-21 12:07:5878 ~UtilitySandboxedProcessLauncherDelegate() override {}
[email protected]34f48682013-03-20 00:30:1879
[email protected]121e61382014-03-13 11:35:1580#if defined(OS_WIN)
amistry467cdc72015-03-13 01:58:4781 bool ShouldLaunchElevated() override { return launch_elevated_; }
rickyz50109312015-11-11 00:37:0882
83 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override {
84 if (exposed_dir_.empty())
85 return true;
86
87 sandbox::ResultCode result;
88 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
89 sandbox::TargetPolicy::FILES_ALLOW_ANY,
90 exposed_dir_.value().c_str());
91 if (result != sandbox::SBOX_ALL_OK)
92 return false;
93
94 base::FilePath exposed_files = exposed_dir_.AppendASCII("*");
95 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
96 sandbox::TargetPolicy::FILES_ALLOW_ANY,
97 exposed_files.value().c_str());
98 return result == sandbox::SBOX_ALL_OK;
[email protected]34f48682013-03-20 00:30:1899 }
rickyz50109312015-11-11 00:37:08100
[email protected]121e61382014-03-13 11:35:15101#elif defined(OS_POSIX)
[email protected]34f48682013-03-20 00:30:18102
kerrnelafd49a83b2016-01-22 21:16:15103#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
104 ZygoteHandle* GetZygote() override {
105 if (no_sandbox_ || !exposed_dir_.empty())
106 return nullptr;
kerrnel94807ee2016-02-01 18:57:28107 return GetGenericZygote();
[email protected]121e61382014-03-13 11:35:15108 }
kerrnelafd49a83b2016-01-22 21:16:15109#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
dchengc2282aa2014-10-21 12:07:58110 base::EnvironmentMap GetEnvironment() override { return env_; }
danakje3de838f2015-12-03 01:49:40111 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
[email protected]121e61382014-03-13 11:35:15112#endif // OS_WIN
113
wfh182da09c2015-06-24 19:23:03114 SandboxType GetSandboxType() override {
115 return SANDBOX_TYPE_UTILITY;
116 }
117
[email protected]121e61382014-03-13 11:35:15118 private:
amistry5f70aa5e2015-02-25 00:46:40119 base::FilePath exposed_dir_;
[email protected]121e61382014-03-13 11:35:15120
121#if defined(OS_WIN)
122 bool launch_elevated_;
123#elif defined(OS_POSIX)
124 base::EnvironmentMap env_;
kerrnelafd49a83b2016-01-22 21:16:15125#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
[email protected]121e61382014-03-13 11:35:15126 bool no_sandbox_;
kerrnelafd49a83b2016-01-22 21:16:15127#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
morritaa409ccc2014-10-20 23:53:25128 base::ScopedFD ipc_fd_;
[email protected]121e61382014-03-13 11:35:15129#endif // OS_WIN
[email protected]34f48682013-03-20 00:30:18130};
[email protected]6d057a0c2013-07-09 21:12:07131
[email protected]d7a2d892013-08-16 07:45:36132UtilityMainThreadFactoryFunction g_utility_main_thread_factory = NULL;
[email protected]6d057a0c2013-07-09 21:12:07133
[email protected]c4f883a2012-02-03 17:02:07134UtilityProcessHost* UtilityProcessHost::Create(
dchengd3c60602014-09-03 17:14:37135 const scoped_refptr<UtilityProcessHostClient>& client,
136 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner) {
[email protected]7f8f24f2012-11-15 19:40:14137 return new UtilityProcessHostImpl(client, client_task_runner);
[email protected]373c1062011-06-09 21:11:51138}
139
[email protected]683f4272014-04-17 20:42:18140void UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(
[email protected]d7a2d892013-08-16 07:45:36141 UtilityMainThreadFactoryFunction create) {
142 g_utility_main_thread_factory = create;
143}
144
[email protected]c4f883a2012-02-03 17:02:07145UtilityProcessHostImpl::UtilityProcessHostImpl(
dchengd3c60602014-09-03 17:14:37146 const scoped_refptr<UtilityProcessHostClient>& client,
147 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner)
[email protected]4967f792012-01-20 22:14:40148 : client_(client),
[email protected]7f8f24f2012-11-15 19:40:14149 client_task_runner_(client_task_runner),
[email protected]373c1062011-06-09 21:11:51150 is_batch_mode_(false),
[email protected]49125952011-09-27 18:05:15151 no_sandbox_(false),
[email protected]fa01e472014-02-11 14:45:35152 run_elevated_(false),
[email protected]49125952011-09-27 18:05:15153#if defined(OS_LINUX)
[email protected]4cb43102011-12-02 20:24:49154 child_flags_(ChildProcessHost::CHILD_ALLOW_SELF),
[email protected]49125952011-09-27 18:05:15155#else
[email protected]4cb43102011-12-02 20:24:49156 child_flags_(ChildProcessHost::CHILD_NORMAL),
[email protected]49125952011-09-27 18:05:15157#endif
amistrycd95c252015-03-20 02:07:04158 started_(false),
asargentf766aa72015-08-24 18:05:49159 name_(base::ASCIIToUTF16("utility process")),
160 weak_ptr_factory_(this) {
[email protected]373c1062011-06-09 21:11:51161}
162
[email protected]c4f883a2012-02-03 17:02:07163UtilityProcessHostImpl::~UtilityProcessHostImpl() {
mostynb042582e2015-03-16 22:13:40164 DCHECK_CURRENTLY_ON(BrowserThread::IO);
[email protected]809d34b2013-07-20 11:51:53165 if (is_batch_mode_)
166 EndBatchMode();
[email protected]373c1062011-06-09 21:11:51167}
168
asargentf766aa72015-08-24 18:05:49169base::WeakPtr<UtilityProcessHost> UtilityProcessHostImpl::AsWeakPtr() {
170 return weak_ptr_factory_.GetWeakPtr();
171}
172
[email protected]c4f883a2012-02-03 17:02:07173bool UtilityProcessHostImpl::Send(IPC::Message* message) {
[email protected]373c1062011-06-09 21:11:51174 if (!StartProcess())
175 return false;
176
[email protected]4967f792012-01-20 22:14:40177 return process_->Send(message);
[email protected]373c1062011-06-09 21:11:51178}
179
[email protected]c4f883a2012-02-03 17:02:07180bool UtilityProcessHostImpl::StartBatchMode() {
[email protected]373c1062011-06-09 21:11:51181 CHECK(!is_batch_mode_);
182 is_batch_mode_ = StartProcess();
183 Send(new UtilityMsg_BatchMode_Started());
184 return is_batch_mode_;
185}
186
[email protected]c4f883a2012-02-03 17:02:07187void UtilityProcessHostImpl::EndBatchMode() {
[email protected]373c1062011-06-09 21:11:51188 CHECK(is_batch_mode_);
189 is_batch_mode_ = false;
190 Send(new UtilityMsg_BatchMode_Finished());
191}
192
[email protected]2dec8ec2013-02-07 19:20:34193void UtilityProcessHostImpl::SetExposedDir(const base::FilePath& dir) {
[email protected]c4f883a2012-02-03 17:02:07194 exposed_dir_ = dir;
[email protected]373c1062011-06-09 21:11:51195}
196
[email protected]c4f883a2012-02-03 17:02:07197void UtilityProcessHostImpl::DisableSandbox() {
198 no_sandbox_ = true;
199}
200
[email protected]fa01e472014-02-11 14:45:35201#if defined(OS_WIN)
202void UtilityProcessHostImpl::ElevatePrivileges() {
203 no_sandbox_ = true;
204 run_elevated_ = true;
205}
206#endif
207
[email protected]dc1571a152012-12-19 02:23:38208const ChildProcessData& UtilityProcessHostImpl::GetData() {
209 return process_->GetData();
210}
211
[email protected]c4f883a2012-02-03 17:02:07212#if defined(OS_POSIX)
213
[email protected]b345c482013-08-30 18:00:39214void UtilityProcessHostImpl::SetEnv(const base::EnvironmentMap& env) {
[email protected]c4f883a2012-02-03 17:02:07215 env_ = env;
216}
217
218#endif // OS_POSIX
219
amistry467cdc72015-03-13 01:58:47220bool UtilityProcessHostImpl::StartMojoMode() {
221 CHECK(!mojo_application_host_);
222 mojo_application_host_.reset(new MojoApplicationHost);
223
224 bool mojo_result = mojo_application_host_->Init();
225 if (!mojo_result)
226 return false;
227
228 return StartProcess();
229}
230
231ServiceRegistry* UtilityProcessHostImpl::GetServiceRegistry() {
amistryfaa231a42015-05-20 01:49:12232 if (mojo_application_host_)
233 return mojo_application_host_->service_registry();
234 return nullptr;
amistry467cdc72015-03-13 01:58:47235}
236
thestig1a255e52015-04-01 17:53:39237void UtilityProcessHostImpl::SetName(const base::string16& name) {
amistrycd95c252015-03-20 02:07:04238 name_ = name;
239}
240
kerrnelafd49a83b2016-01-22 21:16:15241#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
242// static
243void UtilityProcessHostImpl::EarlyZygoteLaunch() {
244 DCHECK(!g_utility_zygote);
245 g_utility_zygote = CreateZygote();
246}
247#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
248
[email protected]c4f883a2012-02-03 17:02:07249bool UtilityProcessHostImpl::StartProcess() {
[email protected]373c1062011-06-09 21:11:51250 if (started_)
251 return true;
252 started_ = true;
253
254 if (is_batch_mode_)
255 return true;
[email protected]6d057a0c2013-07-09 21:12:07256
[email protected]373c1062011-06-09 21:11:51257 // Name must be set or metrics_service will crash in any test which
258 // launches a UtilityProcessHost.
[email protected]6d057a0c2013-07-09 21:12:07259 process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this));
thestig1a255e52015-04-01 17:53:39260 process_->SetName(name_);
[email protected]373c1062011-06-09 21:11:51261
[email protected]4967f792012-01-20 22:14:40262 std::string channel_id = process_->GetHost()->CreateChannel();
[email protected]4734d0b2011-12-03 07:10:44263 if (channel_id.empty())
[email protected]373c1062011-06-09 21:11:51264 return false;
265
[email protected]52819472013-11-24 22:49:55266 if (RenderProcessHost::run_renderer_in_process()) {
267 DCHECK(g_utility_main_thread_factory);
[email protected]6d057a0c2013-07-09 21:12:07268 // See comment in RenderProcessHostImpl::Init() for the background on why we
269 // support single process mode this way.
morritac6238ab2015-03-18 01:48:29270 in_process_thread_.reset(
271 g_utility_main_thread_factory(InProcessChildThreadParams(
272 channel_id, BrowserThread::UnsafeGetMessageLoopForThread(
273 BrowserThread::IO)->task_runner())));
[email protected]6d057a0c2013-07-09 21:12:07274 in_process_thread_->Start();
rockoteb6ee292015-05-18 20:29:38275 OnProcessLaunched();
[email protected]d7a2d892013-08-16 07:45:36276 } else {
[email protected]479278702014-08-11 20:32:09277 const base::CommandLine& browser_command_line =
278 *base::CommandLine::ForCurrentProcess();
[email protected]74a890c2012-09-13 21:42:40279
[email protected]6d057a0c2013-07-09 21:12:07280 bool has_cmd_prefix = browser_command_line.HasSwitch(
281 switches::kUtilityCmdPrefix);
[email protected]74a890c2012-09-13 21:42:40282
twellingtona7bf9632015-11-09 18:18:17283 #if defined(OS_ANDROID)
284 // readlink("/prof/self/exe") sometimes fails on Android at startup.
285 // As a workaround skip calling it here, since the executable name is
286 // not needed on Android anyway. See crbug.com/500854.
287 base::CommandLine* cmd_line =
288 new base::CommandLine(base::CommandLine::NO_PROGRAM);
289 #else
290 int child_flags = child_flags_;
[email protected]74a890c2012-09-13 21:42:40291
twellingtona7bf9632015-11-09 18:18:17292 // When running under gdb, forking /proc/self/exe ends up forking the gdb
293 // executable instead of Chromium. It is almost safe to assume that no
294 // updates will happen while a developer is running with
295 // |switches::kUtilityCmdPrefix|. See ChildProcessHost::GetChildPath() for
296 // a similar case with Valgrind.
297 if (has_cmd_prefix)
298 child_flags = ChildProcessHost::CHILD_NORMAL;
[email protected]373c1062011-06-09 21:11:51299
twellingtona7bf9632015-11-09 18:18:17300 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags);
301 if (exe_path.empty()) {
302 NOTREACHED() << "Unable to get utility process binary name.";
303 return false;
304 }
305
306 base::CommandLine* cmd_line = new base::CommandLine(exe_path);
307 #endif
308
[email protected]6d057a0c2013-07-09 21:12:07309 cmd_line->AppendSwitchASCII(switches::kProcessType,
310 switches::kUtilityProcess);
311 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
312 std::string locale = GetContentClient()->browser()->GetApplicationLocale();
313 cmd_line->AppendSwitchASCII(switches::kLang, locale);
[email protected]373c1062011-06-09 21:11:51314
fdoray343068c42016-02-03 15:45:58315#if defined(OS_WIN)
316 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument())
317 cmd_line->AppendArg(switches::kPrefetchArgumentOther);
318#endif // defined(OS_WIN)
319
jddukeb7ce1e32015-03-18 00:14:17320 if (no_sandbox_)
[email protected]6d057a0c2013-07-09 21:12:07321 cmd_line->AppendSwitch(switches::kNoSandbox);
jddukeb7ce1e32015-03-18 00:14:17322
323 // Browser command-line switches to propagate to the utility process.
324 static const char* const kSwitchNames[] = {
325 switches::kDebugPluginLoading,
326 switches::kNoSandbox,
327 switches::kProfilerTiming,
[email protected]172ca982012-10-03 19:55:07328#if defined(OS_MACOSX)
jddukeb7ce1e32015-03-18 00:14:17329 switches::kEnableSandboxLogging,
[email protected]172ca982012-10-03 19:55:07330#endif
jddukeb7ce1e32015-03-18 00:14:17331 };
332 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
333 arraysize(kSwitchNames));
[email protected]373c1062011-06-09 21:11:51334
[email protected]6d057a0c2013-07-09 21:12:07335 if (has_cmd_prefix) {
[email protected]dc120e72013-11-05 04:36:51336 // Launch the utility child process with some prefix
[email protected]215d49e2013-09-20 07:40:15337 // (usually "xterm -e gdb --args").
[email protected]6d057a0c2013-07-09 21:12:07338 cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative(
339 switches::kUtilityCmdPrefix));
340 }
[email protected]373c1062011-06-09 21:11:51341
[email protected]dc120e72013-11-05 04:36:51342 if (!exposed_dir_.empty()) {
343 cmd_line->AppendSwitchPath(switches::kUtilityProcessAllowedDir,
344 exposed_dir_);
345 }
[email protected]373c1062011-06-09 21:11:51346
[email protected]fa01e472014-02-11 14:45:35347#if defined(OS_WIN)
348 // Let the utility process know if it is intended to be elevated.
349 if (run_elevated_)
350 cmd_line->AppendSwitch(switches::kUtilityProcessRunningElevated);
351#endif
352
[email protected]6d057a0c2013-07-09 21:12:07353 process_->Launch(
[email protected]121e61382014-03-13 11:35:15354 new UtilitySandboxedProcessLauncherDelegate(exposed_dir_,
355 run_elevated_,
356 no_sandbox_, env_,
357 process_->GetHost()),
sievers954e37a2015-03-28 01:50:24358 cmd_line,
359 true);
[email protected]6d057a0c2013-07-09 21:12:07360 }
[email protected]373c1062011-06-09 21:11:51361
362 return true;
363}
364
[email protected]c4f883a2012-02-03 17:02:07365bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) {
dcheng54c3719d2014-08-26 21:52:56366 if (!client_.get())
[email protected]b62c08c2014-08-21 17:48:50367 return true;
368
[email protected]7f8f24f2012-11-15 19:40:14369 client_task_runner_->PostTask(
370 FROM_HERE,
[email protected]b62c08c2014-08-21 17:48:50371 base::Bind(
372 base::IgnoreResult(&UtilityProcessHostClient::OnMessageReceived),
373 client_.get(),
[email protected]c4f883a2012-02-03 17:02:07374 message));
[email protected]b62c08c2014-08-21 17:48:50375
[email protected]373c1062011-06-09 21:11:51376 return true;
377}
378
[email protected]fa01e472014-02-11 14:45:35379void UtilityProcessHostImpl::OnProcessLaunchFailed() {
dcheng54c3719d2014-08-26 21:52:56380 if (!client_.get())
[email protected]b62c08c2014-08-21 17:48:50381 return;
382
[email protected]fa01e472014-02-11 14:45:35383 client_task_runner_->PostTask(
384 FROM_HERE,
385 base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed,
386 client_.get()));
387}
388
[email protected]c4f883a2012-02-03 17:02:07389void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
dcheng54c3719d2014-08-26 21:52:56390 if (!client_.get())
[email protected]b62c08c2014-08-21 17:48:50391 return;
392
[email protected]7f8f24f2012-11-15 19:40:14393 client_task_runner_->PostTask(
394 FROM_HERE,
[email protected]c4f883a2012-02-03 17:02:07395 base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(),
396 exit_code));
[email protected]373c1062011-06-09 21:11:51397}
[email protected]130757672012-10-24 00:26:19398
amistry467cdc72015-03-13 01:58:47399void UtilityProcessHostImpl::OnProcessLaunched() {
400 if (mojo_application_host_) {
401 base::ProcessHandle handle;
402 if (RenderProcessHost::run_renderer_in_process())
403 handle = base::GetCurrentProcessHandle();
404 else
405 handle = process_->GetData().handle;
406
407 mojo_application_host_->Activate(this, handle);
408 }
409}
410
[email protected]130757672012-10-24 00:26:19411} // namespace content