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

Side by Side Diff: content/browser/ppapi_plugin_process_host.cc

Issue 1022703007: Simplify ChildProcessLauncher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher
Patch Set: default arg, rebase Created 5 years, 8 months 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 | « content/browser/plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/ppapi_plugin_process_host.h" 5 #include "content/browser/ppapi_plugin_process_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 // plugin launcher means we need to use another process instead of just 381 // plugin launcher means we need to use another process instead of just
382 // forking the zygote. 382 // forking the zygote.
383 #if defined(OS_POSIX) 383 #if defined(OS_POSIX)
384 if (!info.is_sandboxed) 384 if (!info.is_sandboxed)
385 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); 385 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string());
386 #endif // OS_POSIX 386 #endif // OS_POSIX
387 process_->Launch( 387 process_->Launch(
388 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_, 388 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_,
389 info, 389 info,
390 process_->GetHost()), 390 process_->GetHost()),
391 cmd_line); 391 cmd_line,
392 true);
392 return true; 393 return true;
393 } 394 }
394 395
395 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { 396 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) {
396 base::ProcessHandle process_handle; 397 base::ProcessHandle process_handle;
397 int renderer_child_id; 398 int renderer_child_id;
398 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); 399 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id);
399 400
400 base::ProcessId process_id = (process_handle == base::kNullProcessHandle) ? 401 base::ProcessId process_id = (process_handle == base::kNullProcessHandle) ?
401 0 : base::GetProcId(process_handle); 402 0 : base::GetProcId(process_handle);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // sent_requests_ queue should be the one that the plugin just created. 485 // sent_requests_ queue should be the one that the plugin just created.
485 Client* client = sent_requests_.front(); 486 Client* client = sent_requests_.front();
486 sent_requests_.pop(); 487 sent_requests_.pop();
487 488
488 const ChildProcessData& data = process_->GetData(); 489 const ChildProcessData& data = process_->GetData();
489 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 490 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
490 data.id); 491 data.id);
491 } 492 }
492 493
493 } // namespace content 494 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698