| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC | 5 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC |
| 6 | 6 |
| 7 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ | 7 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ |
| 8 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ | 8 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "content/common/content_export.h" |
| 14 | 15 |
| 15 template <typename T> struct DefaultSingletonTraits; | 16 template <typename T> struct DefaultSingletonTraits; |
| 16 | 17 |
| 17 // This is a singleton object which handles sandbox requests from the | 18 // This is a singleton object which handles sandbox requests from the |
| 18 // renderers. | 19 // renderers. |
| 19 class RenderSandboxHostLinux { | 20 class CONTENT_EXPORT RenderSandboxHostLinux { |
| 20 public: | 21 public: |
| 21 // Returns the singleton instance. | 22 // Returns the singleton instance. |
| 22 static RenderSandboxHostLinux* GetInstance(); | 23 static RenderSandboxHostLinux* GetInstance(); |
| 23 | 24 |
| 24 // Get the file descriptor which renderers should be given in order to signal | 25 // Get the file descriptor which renderers should be given in order to signal |
| 25 // crashes to the browser. | 26 // crashes to the browser. |
| 26 int GetRendererSocket() const { | 27 int GetRendererSocket() const { |
| 27 DCHECK(initialized_); | 28 DCHECK(initialized_); |
| 28 return renderer_socket_; | 29 return renderer_socket_; |
| 29 } | 30 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 43 bool initialized_; | 44 bool initialized_; |
| 44 | 45 |
| 45 int renderer_socket_; | 46 int renderer_socket_; |
| 46 int childs_lifeline_fd_; | 47 int childs_lifeline_fd_; |
| 47 pid_t pid_; | 48 pid_t pid_; |
| 48 | 49 |
| 49 DISALLOW_COPY_AND_ASSIGN(RenderSandboxHostLinux); | 50 DISALLOW_COPY_AND_ASSIGN(RenderSandboxHostLinux); |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ | 53 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ |
| OLD | NEW |