OLD | NEW |
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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // plugin launcher means we need to use another process instead of just | 319 // plugin launcher means we need to use another process instead of just |
320 // forking the zygote. | 320 // forking the zygote. |
321 #if defined(OS_POSIX) | 321 #if defined(OS_POSIX) |
322 bool use_zygote = !is_broker_ && plugin_launcher.empty() && info.is_sandboxed; | 322 bool use_zygote = !is_broker_ && plugin_launcher.empty() && info.is_sandboxed; |
323 if (!info.is_sandboxed) | 323 if (!info.is_sandboxed) |
324 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); | 324 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); |
325 #endif // OS_POSIX | 325 #endif // OS_POSIX |
326 process_->Launch( | 326 process_->Launch( |
327 #if defined(OS_WIN) | 327 #if defined(OS_WIN) |
328 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_), | 328 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_), |
| 329 false, |
329 #elif defined(OS_POSIX) | 330 #elif defined(OS_POSIX) |
330 use_zygote, | 331 use_zygote, |
331 base::EnvironmentMap(), | 332 base::EnvironmentMap(), |
332 #endif | 333 #endif |
333 cmd_line); | 334 cmd_line); |
334 return true; | 335 return true; |
335 } | 336 } |
336 | 337 |
337 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { | 338 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
338 base::ProcessHandle process_handle; | 339 base::ProcessHandle process_handle; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // sent_requests_ queue should be the one that the plugin just created. | 425 // sent_requests_ queue should be the one that the plugin just created. |
425 Client* client = sent_requests_.front(); | 426 Client* client = sent_requests_.front(); |
426 sent_requests_.pop(); | 427 sent_requests_.pop(); |
427 | 428 |
428 const ChildProcessData& data = process_->GetData(); | 429 const ChildProcessData& data = process_->GetData(); |
429 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 430 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
430 data.id); | 431 data.id); |
431 } | 432 } |
432 | 433 |
433 } // namespace content | 434 } // namespace content |
OLD | NEW |