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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 2476883002: Remove obsolete methods from IPC::Channel and related classes. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/ppapi_plugin_process_host.cc
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 4d6c14ba854ac7b35669a94be014e0b4b3062a20..4c7b64120193dc95620eeb9a484252b37f6f2813 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -61,17 +61,12 @@ ZygoteHandle g_ppapi_zygote;
class PpapiPluginSandboxedProcessLauncherDelegate
: public content::SandboxedProcessLauncherDelegate {
public:
- PpapiPluginSandboxedProcessLauncherDelegate(bool is_broker,
- ChildProcessHost* host)
-#if defined(OS_WIN)
- : is_broker_(is_broker) {
-#elif defined(OS_MACOSX) || defined(OS_ANDROID)
- : ipc_fd_(host->TakeClientFileDescriptor()) {
-#elif defined(OS_POSIX)
- : ipc_fd_(host->TakeClientFileDescriptor()), is_broker_(is_broker) {
-#else
- {
+ explicit PpapiPluginSandboxedProcessLauncherDelegate(bool is_broker)
+#if (defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)) || \
+ defined(OS_WIN)
+ : is_broker_(is_broker)
#endif
+ {
}
~PpapiPluginSandboxedProcessLauncherDelegate() override {}
@@ -114,8 +109,7 @@ class PpapiPluginSandboxedProcessLauncherDelegate
return true;
}
-#elif defined(OS_POSIX)
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
ZygoteHandle* GetZygote() override {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
@@ -125,9 +119,6 @@ class PpapiPluginSandboxedProcessLauncherDelegate
return nullptr;
return GetGenericZygote();
}
-#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
-
- base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
#endif // OS_WIN
SandboxType GetSandboxType() override {
@@ -135,9 +126,6 @@ class PpapiPluginSandboxedProcessLauncherDelegate
}
private:
-#if defined(OS_POSIX)
- base::ScopedFD ipc_fd_;
-#endif // OS_POSIX
#if (defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)) || \
defined(OS_WIN)
bool is_broker_;
@@ -447,8 +435,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginInfo& info) {
// On posix, never use the zygote for the broker. Also, only use the zygote if
// we are not using a plugin launcher - having a plugin launcher means we need
// to use another process instead of just forking the zygote.
- process_->Launch(new PpapiPluginSandboxedProcessLauncherDelegate(
- is_broker_, process_->GetHost()),
+ process_->Launch(new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_),
cmd_line, true);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698