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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 621613002: Refactoring: Make IPC::Channel::TakeClientFileDescriptor() a ScopedFD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Mac build Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index a5e9dde5974c8f13d19ec19c1e750d62fc05f912..469eb02287c4586f4261f874ddeb1f4446185806 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -307,7 +307,7 @@ class RendererSandboxedProcessLauncherDelegate
public:
explicit RendererSandboxedProcessLauncherDelegate(IPC::ChannelProxy* channel)
#if defined(OS_POSIX)
- : ipc_fd_(channel->TakeClientFileDescriptor())
+ : ipc_fd_(channel->TakeClientFileDescriptor())
#endif // OS_POSIX
{}
@@ -328,14 +328,14 @@ class RendererSandboxedProcessLauncherDelegate
browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
return renderer_prefix.empty();
}
- virtual int GetIpcFd() override {
- return ipc_fd_;
+ virtual base::ScopedFD TakeIpcFd() override {
+ return ipc_fd_.Pass();
}
#endif // OS_WIN
private:
#if defined(OS_POSIX)
- int ipc_fd_;
+ base::ScopedFD ipc_fd_;
#endif // OS_POSIX
};

Powered by Google App Engine
This is Rietveld 408576698