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

Unified Diff: content/browser/renderer_host/sandbox_ipc_linux.h

Issue 255693002: Make SandboxIPCProcess a thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix compile. Created 6 years, 8 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/sandbox_ipc_linux.h
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.h b/content/browser/renderer_host/sandbox_ipc_linux.h
index 2ebefc2e84df33dc0edd3dea542da6f3842f9fb1..16b8e5c18237a4aaf180edb180fd253984c205bc 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.h
+++ b/content/browser/renderer_host/sandbox_ipc_linux.h
@@ -11,26 +11,21 @@
#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
+#include "base/threading/simple_thread.h"
#include "content/child/blink_platform_impl.h"
#include "skia/ext/skia_utils_base.h"
namespace content {
-class SandboxIPCProcess {
+class SandboxIPCHandler : public base::DelegateSimpleThread::Delegate {
public:
- // lifeline_fd: this is the read end of a pipe which the browser process
- // holds the other end of. If the browser process dies, its descriptors are
- // closed and we will noticed an EOF on the pipe. That's our signal to exit.
- // browser_socket: the browser's end of the sandbox IPC socketpair. From the
- // point of view of the renderer, it's talking to the browser but this
- // object actually services the requests.
+ // browser_socket: the browser's end of the sandbox IPC socketpair.
// sandbox_cmd: the path of the sandbox executable.
- SandboxIPCProcess(int lifeline_fd,
- int browser_socket,
+ SandboxIPCHandler(int browser_socket,
std::string sandbox_cmd);
- ~SandboxIPCProcess();
+ virtual ~SandboxIPCHandler();
- void Run();
+ virtual void Run() OVERRIDE;
private:
void EnsureWebKitInitialized();
@@ -83,13 +78,12 @@ class SandboxIPCProcess {
const Pickle& reply,
int reply_fd);
- const int lifeline_fd_;
const int browser_socket_;
std::vector<std::string> sandbox_cmd_;
scoped_ptr<BlinkPlatformImpl> webkit_platform_support_;
SkTDArray<SkString*> paths_;
- DISALLOW_COPY_AND_ASSIGN(SandboxIPCProcess);
+ DISALLOW_COPY_AND_ASSIGN(SandboxIPCHandler);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698