OLD | NEW |
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 // 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 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 | 14 |
15 template <typename T> struct DefaultSingletonTraits; | 15 template <typename T> struct DefaultSingletonTraits; |
16 | 16 |
| 17 namespace content { |
| 18 |
17 // This is a singleton object which handles sandbox requests from the | 19 // This is a singleton object which handles sandbox requests from the |
18 // renderers. | 20 // renderers. |
19 class CONTENT_EXPORT RenderSandboxHostLinux { | 21 class CONTENT_EXPORT RenderSandboxHostLinux { |
20 public: | 22 public: |
21 // Returns the singleton instance. | 23 // Returns the singleton instance. |
22 static RenderSandboxHostLinux* GetInstance(); | 24 static RenderSandboxHostLinux* GetInstance(); |
23 | 25 |
24 // Get the file descriptor which renderers should be given in order to signal | 26 // Get the file descriptor which renderers should be given in order to signal |
25 // crashes to the browser. | 27 // crashes to the browser. |
26 int GetRendererSocket() const { | 28 int GetRendererSocket() const { |
(...skipping 15 matching lines...) Expand all Loading... |
42 // Whether Init() has been called yet. | 44 // Whether Init() has been called yet. |
43 bool initialized_; | 45 bool initialized_; |
44 | 46 |
45 int renderer_socket_; | 47 int renderer_socket_; |
46 int childs_lifeline_fd_; | 48 int childs_lifeline_fd_; |
47 pid_t pid_; | 49 pid_t pid_; |
48 | 50 |
49 DISALLOW_COPY_AND_ASSIGN(RenderSandboxHostLinux); | 51 DISALLOW_COPY_AND_ASSIGN(RenderSandboxHostLinux); |
50 }; | 52 }; |
51 | 53 |
| 54 } // namespace content |
| 55 |
52 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ | 56 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ |
OLD | NEW |