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

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

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds the elevation flag to the utility process. Created 6 years, 10 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
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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // plugin launcher means we need to use another process instead of just 333 // plugin launcher means we need to use another process instead of just
334 // forking the zygote. 334 // forking the zygote.
335 #if defined(OS_POSIX) 335 #if defined(OS_POSIX)
336 bool use_zygote = !is_broker_ && plugin_launcher.empty() && info.is_sandboxed; 336 bool use_zygote = !is_broker_ && plugin_launcher.empty() && info.is_sandboxed;
337 if (!info.is_sandboxed) 337 if (!info.is_sandboxed)
338 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); 338 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string());
339 #endif // OS_POSIX 339 #endif // OS_POSIX
340 process_->Launch( 340 process_->Launch(
341 #if defined(OS_WIN) 341 #if defined(OS_WIN)
342 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_), 342 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_),
343 false,
343 #elif defined(OS_POSIX) 344 #elif defined(OS_POSIX)
344 use_zygote, 345 use_zygote,
345 base::EnvironmentMap(), 346 base::EnvironmentMap(),
346 #endif 347 #endif
347 cmd_line); 348 cmd_line);
348 return true; 349 return true;
349 } 350 }
350 351
351 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { 352 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) {
352 base::ProcessHandle process_handle; 353 base::ProcessHandle process_handle;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // sent_requests_ queue should be the one that the plugin just created. 441 // sent_requests_ queue should be the one that the plugin just created.
441 Client* client = sent_requests_.front(); 442 Client* client = sent_requests_.front();
442 sent_requests_.pop(); 443 sent_requests_.pop();
443 444
444 const ChildProcessData& data = process_->GetData(); 445 const ChildProcessData& data = process_->GetData();
445 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 446 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
446 data.id); 447 data.id);
447 } 448 }
448 449
449 } // namespace content 450 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698