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

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

Issue 2850903002: Clean up Linux zygote creation code (Closed)
Patch Set: Created 3 years, 7 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #endif 100 #endif
101 const base::string16& sid = 101 const base::string16& sid =
102 browser_client->GetAppContainerSidForSandboxType(GetSandboxType()); 102 browser_client->GetAppContainerSidForSandboxType(GetSandboxType());
103 if (!sid.empty()) 103 if (!sid.empty())
104 AddAppContainerPolicy(policy, sid.c_str()); 104 AddAppContainerPolicy(policy, sid.c_str());
105 105
106 return true; 106 return true;
107 } 107 }
108 108
109 #elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 109 #elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
110 ZygoteHandle* GetZygote() override { 110 ZygoteHandle GetZygote() override {
111 const base::CommandLine& browser_command_line = 111 const base::CommandLine& browser_command_line =
112 *base::CommandLine::ForCurrentProcess(); 112 *base::CommandLine::ForCurrentProcess();
113 base::CommandLine::StringType plugin_launcher = browser_command_line 113 base::CommandLine::StringType plugin_launcher = browser_command_line
114 .GetSwitchValueNative(switches::kPpapiPluginLauncher); 114 .GetSwitchValueNative(switches::kPpapiPluginLauncher);
115 if (is_broker_ || !plugin_launcher.empty()) 115 if (is_broker_ || !plugin_launcher.empty())
116 return nullptr; 116 return nullptr;
117 return GetGenericZygote(); 117 return GetGenericZygote();
118 } 118 }
119 #endif // OS_WIN 119 #endif // OS_WIN
120 120
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // sent_requests_ queue should be the one that the plugin just created. 538 // sent_requests_ queue should be the one that the plugin just created.
539 Client* client = sent_requests_.front(); 539 Client* client = sent_requests_.front();
540 sent_requests_.pop(); 540 sent_requests_.pop();
541 541
542 const ChildProcessData& data = process_->GetData(); 542 const ChildProcessData& data = process_->GetData();
543 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 543 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
544 data.id); 544 data.id);
545 } 545 }
546 546
547 } // namespace content 547 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698